Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit b2e833b

Browse files
committed
Implement passing GYP_DEFINES as an environment variable
This closes #229
1 parent 1813923 commit b2e833b

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Fix architecture detection for armv7 #226
44
* Update upstream v8 version to 5.4.500.31
55
* Dramatically reduce the binary size on macOS (thanks @aviat)
6+
* Allow passing of GYP_DEFINES as an environment variable
67

78
### v5.3.332.38.2, v5.3.332.38.3 - 2016-11-21
89

ext/libv8/builder.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ def gyp_defines(*defines)
3535
# Pass clang flag to GYP in order to work around GCC compilation failures
3636
defines << "clang=#{@compiler.is_a?(Compiler::Clang) ? '1' : '0'}"
3737

38+
# Add contents of the GYP_DEFINES environment variable if present
39+
defines << ENV['GYP_DEFINES'] unless ENV['GYP_DEFINES'].nil?
40+
3841
"GYP_DEFINES=\"#{defines.join ' '}\""
3942
end
4043

0 commit comments

Comments
 (0)