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

Commit d30321e

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

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
@@ -2,6 +2,7 @@
22

33
* Fix architecture detection for armv7 #226
44
* Dramatically reduce the binary size on macOS (thanks @aviat)
5+
* Allow passing of GYP_DEFINES as an environment variable
56

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

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)