Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: gypfiles/standalone.gypi

Issue 2028623002: [build] Use sysroot for linux compilation with clang (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merged fix from https://codereview.chromium.org/2040803005/ Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 'v8_enable_backtrace%': 0, 42 'v8_enable_backtrace%': 0,
43 'v8_enable_i18n_support%': 1, 43 'v8_enable_i18n_support%': 1,
44 'v8_deprecation_warnings': 1, 44 'v8_deprecation_warnings': 1,
45 'v8_imminent_deprecation_warnings': 1, 45 'v8_imminent_deprecation_warnings': 1,
46 'msvs_multi_core_compile%': '1', 46 'msvs_multi_core_compile%': '1',
47 'mac_deployment_target%': '10.7', 47 'mac_deployment_target%': '10.7',
48 'release_extra_cflags%': '', 48 'release_extra_cflags%': '',
49 'variables': { 49 'variables': {
50 'variables': { 50 'variables': {
51 'variables': { 51 'variables': {
52 'conditions': [ 52 'variables': {
53 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or \ 53 'conditions': [
54 OS=="netbsd" or OS=="mac" or OS=="qnx" or OS=="aix"', { 54 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or \
55 # This handles the Unix platforms we generally deal with. 55 OS=="netbsd" or OS=="mac" or OS=="qnx" or OS=="aix"', {
56 # Anything else gets passed through, which probably won't work 56 # This handles the Unix platforms we generally deal with.
57 # very well; such hosts should pass an explicit target_arch 57 # Anything else gets passed through, which probably won't work
58 # to gyp. 58 # very well; such hosts should pass an explicit target_arch
59 'host_arch%': '<!pymod_do_main(detect_v8_host_arch)', 59 # to gyp.
60 }, { 60 'host_arch%': '<!pymod_do_main(detect_v8_host_arch)',
61 # OS!="linux" and OS!="freebsd" and OS!="openbsd" and 61 }, {
62 # OS!="netbsd" and OS!="mac" and OS!="aix" 62 # OS!="linux" and OS!="freebsd" and OS!="openbsd" and
63 'host_arch%': 'ia32', 63 # OS!="netbsd" and OS!="mac" and OS!="aix"
64 }], 64 'host_arch%': 'ia32',
65 ], 65 }],
66 ],
67 },
68 'host_arch%': '<(host_arch)',
69 'target_arch%': '<(host_arch)',
70
71 # By default we build against a stable sysroot image to avoid
72 # depending on the packages installed on the local machine. Set this
73 # to 0 to build against locally installed headers and libraries (e.g.
74 # if packaging for a linux distro)
75 'use_sysroot%': 1,
66 }, 76 },
67 'host_arch%': '<(host_arch)', 77 'host_arch%': '<(host_arch)',
68 'target_arch%': '<(host_arch)', 78 'target_arch%': '<(target_arch)',
79 'use_sysroot%': '<(use_sysroot)',
69 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()" )', 80 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()" )',
70 81
71 # Instrument for code coverage and use coverage wrapper to exclude some 82 # Instrument for code coverage and use coverage wrapper to exclude some
72 # files. Uses gcov if clang=0 is set explicitly. Otherwise, 83 # files. Uses gcov if clang=0 is set explicitly. Otherwise,
73 # sanitizer_coverage must be set too. 84 # sanitizer_coverage must be set too.
74 'coverage%': 0, 85 'coverage%': 0,
86
87 # Default sysroot if no sysroot can be provided.
88 'sysroot%': '',
89
90 'conditions': [
91 # The system root for linux builds.
92 ['OS=="linux" and use_sysroot==1', {
93 'conditions': [
94 ['target_arch=="arm"', {
95 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy _arm-sysroot',
96 }],
97 ['target_arch=="x64"', {
98 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy _amd64-sysroot',
99 }],
100 ['target_arch=="ia32"', {
101 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy _i386-sysroot',
102 }],
103 ['target_arch=="mipsel"', {
104 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy _mips-sysroot',
105 }],
106 ],
107 }], # OS=="linux" and use_sysroot==1
108 ],
75 }, 109 },
76 'base_dir%': '<(base_dir)', 110 'base_dir%': '<(base_dir)',
77 'host_arch%': '<(host_arch)', 111 'host_arch%': '<(host_arch)',
78 'target_arch%': '<(target_arch)', 112 'target_arch%': '<(target_arch)',
79 'v8_target_arch%': '<(target_arch)', 113 'v8_target_arch%': '<(target_arch)',
80 'coverage%': '<(coverage)', 114 'coverage%': '<(coverage)',
115 'sysroot%': '<(sysroot)',
81 'asan%': 0, 116 'asan%': 0,
82 'lsan%': 0, 117 'lsan%': 0,
83 'msan%': 0, 118 'msan%': 0,
84 'tsan%': 0, 119 'tsan%': 0,
85 # Enable coverage gathering instrumentation in sanitizer tools. This flag 120 # Enable coverage gathering instrumentation in sanitizer tools. This flag
86 # also controls coverage granularity (1 for function-level, 2 for 121 # also controls coverage granularity (1 for function-level, 2 for
87 # block-level, 3 for edge-level). 122 # block-level, 3 for edge-level).
88 'sanitizer_coverage%': 0, 123 'sanitizer_coverage%': 0,
89 # Use libc++ (buildtools/third_party/libc++ and 124 # Use libc++ (buildtools/third_party/libc++ and
90 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard 125 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 'sanitizer_coverage%': '<(sanitizer_coverage)', 189 'sanitizer_coverage%': '<(sanitizer_coverage)',
155 'use_custom_libcxx%': '<(use_custom_libcxx)', 190 'use_custom_libcxx%': '<(use_custom_libcxx)',
156 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', 191 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)',
157 'use_lto%': '<(use_lto)', 192 'use_lto%': '<(use_lto)',
158 'cfi_vptr%': '<(cfi_vptr)', 193 'cfi_vptr%': '<(cfi_vptr)',
159 'cfi_diag%': '<(cfi_diag)', 194 'cfi_diag%': '<(cfi_diag)',
160 'cfi_blacklist%': '<(cfi_blacklist)', 195 'cfi_blacklist%': '<(cfi_blacklist)',
161 'test_isolation_mode%': '<(test_isolation_mode)', 196 'test_isolation_mode%': '<(test_isolation_mode)',
162 'fastbuild%': '<(fastbuild)', 197 'fastbuild%': '<(fastbuild)',
163 'coverage%': '<(coverage)', 198 'coverage%': '<(coverage)',
199 'sysroot%': '<(sysroot)',
164 200
165 # Add a simple extras solely for the purpose of the cctests 201 # Add a simple extras solely for the purpose of the cctests
166 'v8_extra_library_files': ['../test/cctest/test-extra.js'], 202 'v8_extra_library_files': ['../test/cctest/test-extra.js'],
167 'v8_experimental_extra_library_files': ['../test/cctest/test-experimental-ex tra.js'], 203 'v8_experimental_extra_library_files': ['../test/cctest/test-experimental-ex tra.js'],
168 204
169 # .gyp files or targets should set v8_code to 1 if they build V8 specific 205 # .gyp files or targets should set v8_code to 1 if they build V8 specific
170 # code, as opposed to external code. This variable is used to control such 206 # code, as opposed to external code. This variable is used to control such
171 # things as the set of warnings to enable, and whether warnings are treated 207 # things as the set of warnings to enable, and whether warnings are treated
172 # as errors. 208 # as errors.
173 'v8_code%': 0, 209 'v8_code%': 0,
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 # 660 #
625 # Disabled when using GCC LTO because GCC also uses the -B search 661 # 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 662 # path at link time to find "as", and our bundled "as" can only
627 # target x86. 663 # target x86.
628 'ldflags': [ 664 'ldflags': [
629 # Note, Chromium allows ia32 host arch as well, we limit this to 665 # Note, Chromium allows ia32 host arch as well, we limit this to
630 # x64 in v8. 666 # x64 in v8.
631 '-B<(base_dir)/third_party/binutils/Linux_x64/Release/bin', 667 '-B<(base_dir)/third_party/binutils/Linux_x64/Release/bin',
632 ], 668 ],
633 }], 669 }],
670 ['sysroot!="" and clang==1', {
671 'target_conditions': [
672 ['_toolset=="target"', {
673 'cflags': [
674 '--sysroot=<(sysroot)',
675 ],
676 'ldflags': [
677 '--sysroot=<(sysroot)',
678 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
679 ],
680 }]]
681 }],
634 ], 682 ],
635 }, 683 },
636 }], 684 }],
637 ['OS=="mac"', { 685 ['OS=="mac"', {
638 'target_defaults': { 686 'target_defaults': {
639 'conditions': [ 687 'conditions': [
640 ['asan==1', { 688 ['asan==1', {
641 'xcode_settings': { 689 'xcode_settings': {
642 # FIXME(machenbach): This is outdated compared to common.gypi. 690 # FIXME(machenbach): This is outdated compared to common.gypi.
643 'OTHER_CFLAGS+': [ 691 'OTHER_CFLAGS+': [
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 '-fsanitize=cfi-vcall', 1476 '-fsanitize=cfi-vcall',
1429 '-fsanitize=cfi-derived-cast', 1477 '-fsanitize=cfi-derived-cast',
1430 '-fsanitize=cfi-unrelated-cast', 1478 '-fsanitize=cfi-unrelated-cast',
1431 ], 1479 ],
1432 }], 1480 }],
1433 ], 1481 ],
1434 }, 1482 },
1435 }], 1483 }],
1436 ], 1484 ],
1437 } 1485 }
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698