4 'make_clang_dir%': 'vendor/llvm-build/Release+Asserts',
5 # Set this to true when building with Clang.
9 # The minimum macOS SDK version to use.
10 'mac_sdk_min%': '10.10',
12 # Set ARM architecture version.
15 # Set NEON compilation flags.
18 # Abosulte path to source root.
19 'source_root%': '<!(node <(DEPTH)/tools/atom_source_root.js)',
22 # Copy conditionally-set variables out one scope.
23 'mac_sdk_min%': '<(mac_sdk_min)',
24 'arm_version%': '<(arm_version)',
25 'arm_neon%': '<(arm_neon)',
26 'source_root%': '<(source_root)',
28 # Variables to control Link-Time Optimization (LTO).
33 # Do not use Clang on Windows.
38 # Search for the available version of SDK.
40 'mac_sdk%': '<!(python <(DEPTH)/tools/mac/find_sdk.py <(mac_sdk_min))',
45 # The system libdir used for this ABI.
46 'system_libdir%': 'lib',
48 # Setting the path to sysroot.
50 ['target_arch=="arm"', {
51 # sysroot needs to be an absolute path otherwise it generates
52 # incorrect results when passed to pkg-config
53 'sysroot%': '<(source_root)/vendor/debian_wheezy_arm-sysroot',
55 ['target_arch=="ia32"', {
56 'sysroot%': '<(source_root)/vendor/debian_wheezy_i386-sysroot',
58 ['target_arch=="x64"', {
59 'sysroot%': '<(source_root)/vendor/debian_wheezy_amd64-sysroot',
63 # Copy conditionally-set variables out one scope.
64 'sysroot%': '<(sysroot)',
65 'system_libdir%': '<(system_libdir)',
67 # Redirect pkg-config to search from sysroot.
68 'pkg-config%': '<(source_root)/tools/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)" "<(system_libdir)"',
71 # Set default compiler flags depending on ARM version.
76 'arm_float_abi%': 'softfp',
80 'arm_arch%': 'armv7-a',
81 'arm_tune%': 'generic-armv7-a',
86 'arm_fpu%': 'vfpv3-d16',
89 'arm_float_abi%': 'hard',
95 # Setup building with clang.
97 'make_global_settings': [
98 ['CC', '<(make_clang_dir)/bin/clang'],
99 ['CXX', '<(make_clang_dir)/bin/clang++'],
100 ['CC.host', '$(CC)'],
101 ['CXX.host', '$(CXX)'],
108 'CC': '<(make_clang_dir)/bin/clang',
109 'LDPLUSPLUS': '<(make_clang_dir)/bin/clang++',
111 '-fcolor-diagnostics',
114 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
115 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++
116 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', # -std=c++11
118 'target_conditions': [
119 ['_type in ["executable", "shared_library"]', {
121 # On some machines setting CLANG_CXX_LIBRARY doesn't work for
123 'OTHER_LDFLAGS': [ '-stdlib=libc++' ],
130 # Specify the SDKROOT.
134 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
139 # Setup sysroot environment.
140 ['OS=="linux" and target_arch in ["arm", "ia32", "x64"]', {
142 'target_conditions': [
143 ['_toolset=="target"', {
145 '--sysroot=<(sysroot)',
148 '--sysroot=<(sysroot)',
149 '<!(<(source_root)/tools/linux/sysroot_ld_path.sh <(sysroot))',
156 # Setup cross-compilation on Linux.
159 'target_conditions': [
160 ['target_arch=="ia32" and _toolset=="target"', {
167 '-mmmx', # Allows mmintrin.h for MMX intrinsics.
173 }], # target_arch=="ia32" and _toolset=="target"
174 ['target_arch=="x64" and _toolset=="target"', {
182 }], # target_arch=="x64" and _toolset=="target"
183 ['target_arch=="arm" and _toolset=="target"', {
190 ['clang==1 and arm_arch!=""', {
192 '-target arm-linux-gnueabihf',
195 '-target arm-linux-gnueabihf',
200 '-march=<(arm_arch)',
203 ['use_lto==1 or use_lto_o2==1', {
205 '-march=<(arm_arch)',
212 '-mtune=<(arm_tune)',
215 ['use_lto==1 or use_lto_o2==1', {
217 '-mtune=<(arm_tune)',
227 ['use_lto==1 or use_lto_o2==1', {
234 ['arm_float_abi!=""', {
236 '-mfloat-abi=<(arm_float_abi)',
239 ['use_lto==1 or use_lto_o2==1', {
241 '-mfloat-abi=<(arm_float_abi)',
251 ['use_lto==1 or use_lto_o2==1', {
259 }], # target_arch=="arm" and _toolset=="target"