OLD | NEW |
---|---|
1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 # Anything else gets passed through, which probably won't work | 56 # Anything else gets passed through, which probably won't work |
57 # very well; such hosts should pass an explicit target_arch | 57 # very well; such hosts should pass an explicit target_arch |
58 # to gyp. | 58 # to gyp. |
59 'host_arch%': '<!pymod_do_main(detect_v8_host_arch)', | 59 'host_arch%': '<!pymod_do_main(detect_v8_host_arch)', |
60 }, { | 60 }, { |
61 # OS!="linux" and OS!="freebsd" and OS!="openbsd" and | 61 # OS!="linux" and OS!="freebsd" and OS!="openbsd" and |
62 # OS!="netbsd" and OS!="mac" and OS!="aix" | 62 # OS!="netbsd" and OS!="mac" and OS!="aix" |
63 'host_arch%': 'ia32', | 63 'host_arch%': 'ia32', |
64 }], | 64 }], |
65 ], | 65 ], |
66 | |
67 # By default we build against a stable sysroot image to avoid | |
68 # depending on the packages installed on the local machine. Set this | |
69 # to 0 to build against locally installed headers and libraries (e.g. | |
70 # if packaging for a linux distro) | |
71 'use_sysroot%': 1, | |
66 }, | 72 }, |
67 'host_arch%': '<(host_arch)', | 73 'host_arch%': '<(host_arch)', |
68 'target_arch%': '<(host_arch)', | 74 'target_arch%': '<(host_arch)', |
75 'use_sysroot%': '<(use_sysroot)', | |
69 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()" )', | 76 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()" )', |
70 | 77 |
71 # Instrument for code coverage and use coverage wrapper to exclude some | 78 # Instrument for code coverage and use coverage wrapper to exclude some |
72 # files. Uses gcov if clang=0 is set explicitly. Otherwise, | 79 # files. Uses gcov if clang=0 is set explicitly. Otherwise, |
73 # sanitizer_coverage must be set too. | 80 # sanitizer_coverage must be set too. |
74 'coverage%': 0, | 81 'coverage%': 0, |
82 | |
83 'conditions': [ | |
84 # The system root for linux builds. | |
85 ['OS=="linux" and use_sysroot==1', { | |
86 'conditions': [ | |
87 ['target_arch=="arm"', { | |
88 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy _arm-sysroot', | |
89 }], | |
90 ['target_arch=="x64"', { | |
91 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy _amd64-sysroot', | |
92 }], | |
93 ['target_arch=="ia32"', { | |
94 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy _i386-sysroot', | |
95 }], | |
96 ['target_arch=="mipsel"', { | |
97 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy _mips-sysroot', | |
98 }], | |
99 ], | |
vogelheim
2016/06/01 10:51:19
I'm not sure what gyp does if OS is linux, use_sys
Michael Achenbach
2016/06/01 11:20:37
I think it'll error out. So one should not set use
| |
100 }, { | |
101 'sysroot%': '' | |
102 }], # OS=="linux" and use_sysroot==1 | |
103 ], | |
75 }, | 104 }, |
76 'base_dir%': '<(base_dir)', | 105 'base_dir%': '<(base_dir)', |
77 'host_arch%': '<(host_arch)', | 106 'host_arch%': '<(host_arch)', |
78 'target_arch%': '<(target_arch)', | 107 'target_arch%': '<(target_arch)', |
79 'v8_target_arch%': '<(target_arch)', | 108 'v8_target_arch%': '<(target_arch)', |
80 'coverage%': '<(coverage)', | 109 'coverage%': '<(coverage)', |
110 'sysroot%': '<(sysroot)', | |
81 'asan%': 0, | 111 'asan%': 0, |
82 'lsan%': 0, | 112 'lsan%': 0, |
83 'msan%': 0, | 113 'msan%': 0, |
84 'tsan%': 0, | 114 'tsan%': 0, |
85 # Enable coverage gathering instrumentation in sanitizer tools. This flag | 115 # Enable coverage gathering instrumentation in sanitizer tools. This flag |
86 # also controls coverage granularity (1 for function-level, 2 for | 116 # also controls coverage granularity (1 for function-level, 2 for |
87 # block-level, 3 for edge-level). | 117 # block-level, 3 for edge-level). |
88 'sanitizer_coverage%': 0, | 118 'sanitizer_coverage%': 0, |
89 # Use libc++ (buildtools/third_party/libc++ and | 119 # Use libc++ (buildtools/third_party/libc++ and |
90 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard | 120 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 'use_custom_libcxx%': '<(use_custom_libcxx)', | 188 'use_custom_libcxx%': '<(use_custom_libcxx)', |
159 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', | 189 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', |
160 'use_lto%': '<(use_lto)', | 190 'use_lto%': '<(use_lto)', |
161 'cfi_vptr%': '<(cfi_vptr)', | 191 'cfi_vptr%': '<(cfi_vptr)', |
162 'cfi_diag%': '<(cfi_diag)', | 192 'cfi_diag%': '<(cfi_diag)', |
163 'cfi_blacklist%': '<(cfi_blacklist)', | 193 'cfi_blacklist%': '<(cfi_blacklist)', |
164 'test_isolation_mode%': '<(test_isolation_mode)', | 194 'test_isolation_mode%': '<(test_isolation_mode)', |
165 'fastbuild%': '<(fastbuild)', | 195 'fastbuild%': '<(fastbuild)', |
166 'coverage%': '<(coverage)', | 196 'coverage%': '<(coverage)', |
167 'has_valgrind%': '<(has_valgrind)', | 197 'has_valgrind%': '<(has_valgrind)', |
198 'sysroot%': '<(sysroot)', | |
168 | 199 |
169 # Add a simple extras solely for the purpose of the cctests | 200 # Add a simple extras solely for the purpose of the cctests |
170 'v8_extra_library_files': ['../test/cctest/test-extra.js'], | 201 'v8_extra_library_files': ['../test/cctest/test-extra.js'], |
171 'v8_experimental_extra_library_files': ['../test/cctest/test-experimental-ex tra.js'], | 202 'v8_experimental_extra_library_files': ['../test/cctest/test-experimental-ex tra.js'], |
172 | 203 |
173 # .gyp files or targets should set v8_code to 1 if they build V8 specific | 204 # .gyp files or targets should set v8_code to 1 if they build V8 specific |
174 # code, as opposed to external code. This variable is used to control such | 205 # code, as opposed to external code. This variable is used to control such |
175 # things as the set of warnings to enable, and whether warnings are treated | 206 # things as the set of warnings to enable, and whether warnings are treated |
176 # as errors. | 207 # as errors. |
177 'v8_code%': 0, | 208 'v8_code%': 0, |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
624 # | 655 # |
625 # Disabled when using GCC LTO because GCC also uses the -B search | 656 # Disabled when using GCC LTO because GCC also uses the -B search |
626 # path at link time to find "as", and our bundled "as" can only | 657 # path at link time to find "as", and our bundled "as" can only |
627 # target x86. | 658 # target x86. |
628 'ldflags': [ | 659 'ldflags': [ |
629 # Note, Chromium allows ia32 host arch as well, we limit this to | 660 # Note, Chromium allows ia32 host arch as well, we limit this to |
630 # x64 in v8. | 661 # x64 in v8. |
631 '-B<(base_dir)/third_party/binutils/Linux_x64/Release/bin', | 662 '-B<(base_dir)/third_party/binutils/Linux_x64/Release/bin', |
632 ], | 663 ], |
633 }], | 664 }], |
665 ['sysroot!="" and clang==1', { | |
666 'target_conditions': [ | |
667 ['_toolset=="target"', { | |
668 'cflags': [ | |
669 '--sysroot=<(sysroot)', | |
670 ], | |
671 'ldflags': [ | |
672 '--sysroot=<(sysroot)', | |
673 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', | |
674 ], | |
675 }]] | |
676 }], | |
634 ], | 677 ], |
635 }, | 678 }, |
636 }], | 679 }], |
637 ['OS=="mac"', { | 680 ['OS=="mac"', { |
638 'target_defaults': { | 681 'target_defaults': { |
639 'conditions': [ | 682 'conditions': [ |
640 ['asan==1', { | 683 ['asan==1', { |
641 'xcode_settings': { | 684 'xcode_settings': { |
642 # FIXME(machenbach): This is outdated compared to common.gypi. | 685 # FIXME(machenbach): This is outdated compared to common.gypi. |
643 'OTHER_CFLAGS+': [ | 686 'OTHER_CFLAGS+': [ |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1427 '-fsanitize=cfi-vcall', | 1470 '-fsanitize=cfi-vcall', |
1428 '-fsanitize=cfi-derived-cast', | 1471 '-fsanitize=cfi-derived-cast', |
1429 '-fsanitize=cfi-unrelated-cast', | 1472 '-fsanitize=cfi-unrelated-cast', |
1430 ], | 1473 ], |
1431 }], | 1474 }], |
1432 ], | 1475 ], |
1433 }, | 1476 }, |
1434 }], | 1477 }], |
1435 ], | 1478 ], |
1436 } | 1479 } |
OLD | NEW |