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

Side by Side Diff: build/standalone.gypi

Issue 1217783002: [android] Configure building android with ninja and clang. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: OS independent cwd check Created 5 years, 5 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 | « build/gyp_v8 ('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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 'host_arch%': '<!pymod_do_main(detect_v8_host_arch)', 60 'host_arch%': '<!pymod_do_main(detect_v8_host_arch)',
61 }, { 61 }, {
62 # OS!="linux" and OS!="freebsd" and OS!="openbsd" and 62 # OS!="linux" and OS!="freebsd" and OS!="openbsd" and
63 # OS!="netbsd" and OS!="mac" and OS!="aix" 63 # OS!="netbsd" and OS!="mac" and OS!="aix"
64 'host_arch%': 'ia32', 64 'host_arch%': 'ia32',
65 }], 65 }],
66 ], 66 ],
67 }, 67 },
68 'host_arch%': '<(host_arch)', 68 'host_arch%': '<(host_arch)',
69 'target_arch%': '<(host_arch)', 69 'target_arch%': '<(host_arch)',
70 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()" )',
70 }, 71 },
72 'base_dir%': '<(base_dir)',
71 'host_arch%': '<(host_arch)', 73 'host_arch%': '<(host_arch)',
72 'target_arch%': '<(target_arch)', 74 'target_arch%': '<(target_arch)',
73 'v8_target_arch%': '<(target_arch)', 75 'v8_target_arch%': '<(target_arch)',
74 'asan%': 0, 76 'asan%': 0,
75 'lsan%': 0, 77 'lsan%': 0,
76 'msan%': 0, 78 'msan%': 0,
77 'tsan%': 0, 79 'tsan%': 0,
78 # Enable coverage gathering instrumentation in sanitizer tools. This flag 80 # Enable coverage gathering instrumentation in sanitizer tools. This flag
79 # also controls coverage granularity (1 for function-level, 2 for 81 # also controls coverage granularity (1 for function-level, 2 for
80 # block-level, 3 for edge-level). 82 # block-level, 3 for edge-level).
81 'sanitizer_coverage%': 0, 83 'sanitizer_coverage%': 0,
82 # Use libc++ (buildtools/third_party/libc++ and 84 # Use libc++ (buildtools/third_party/libc++ and
83 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard 85 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard
84 # library. This is intended to be used for instrumented builds. 86 # library. This is intended to be used for instrumented builds.
85 'use_custom_libcxx%': 0, 87 'use_custom_libcxx%': 0,
86 88
87 'clang_dir%': 'third_party/llvm-build/Release+Asserts', 89 'clang_dir%': '<(base_dir)/third_party/llvm-build/Release+Asserts',
88 90
89 # goma settings. 91 # goma settings.
90 # 1 to use goma. 92 # 1 to use goma.
91 # If no gomadir is set, it uses the default gomadir. 93 # If no gomadir is set, it uses the default gomadir.
92 'use_goma%': 0, 94 'use_goma%': 0,
93 'gomadir%': '', 95 'gomadir%': '',
94 'conditions': [ 96 'conditions': [
95 # Set default gomadir. 97 # Set default gomadir.
96 ['OS=="win"', { 98 ['OS=="win"', {
97 'gomadir': 'c:\\goma\\goma-win', 99 'gomadir': 'c:\\goma\\goma-win',
98 }, { 100 }, {
99 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', 101 'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
100 }], 102 }],
101 ['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le"', { 103 ['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le"', {
102 'host_clang%': '1', 104 'host_clang%': '1',
103 }, { 105 }, {
104 'host_clang%': '0', 106 'host_clang%': '0',
105 }], 107 }],
106 ], 108 ],
107 }, 109 },
110 'base_dir%': '<(base_dir)',
108 'clang_dir%': '<(clang_dir)', 111 'clang_dir%': '<(clang_dir)',
109 'host_arch%': '<(host_arch)', 112 'host_arch%': '<(host_arch)',
110 'host_clang%': '<(host_clang)', 113 'host_clang%': '<(host_clang)',
111 'target_arch%': '<(target_arch)', 114 'target_arch%': '<(target_arch)',
112 'v8_target_arch%': '<(v8_target_arch)', 115 'v8_target_arch%': '<(v8_target_arch)',
113 'werror%': '-Werror', 116 'werror%': '-Werror',
114 'use_goma%': '<(use_goma)', 117 'use_goma%': '<(use_goma)',
115 'gomadir%': '<(gomadir)', 118 'gomadir%': '<(gomadir)',
116 'asan%': '<(asan)', 119 'asan%': '<(asan)',
117 'lsan%': '<(lsan)', 120 'lsan%': '<(lsan)',
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 # Gradually roll out v8_use_external_startup_data. 211 # Gradually roll out v8_use_external_startup_data.
209 # Should eventually be default enabled on all platforms. 212 # Should eventually be default enabled on all platforms.
210 'v8_use_external_startup_data%': 1, 213 'v8_use_external_startup_data%': 1,
211 }], 214 }],
212 ['OS=="android"', { 215 ['OS=="android"', {
213 # Location of Android NDK. 216 # Location of Android NDK.
214 'variables': { 217 'variables': {
215 'variables': { 218 'variables': {
216 # The Android toolchain needs to use the absolute path to the NDK 219 # The Android toolchain needs to use the absolute path to the NDK
217 # because it is used at different levels in the GYP files. 220 # because it is used at different levels in the GYP files.
218 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_ tools/ndk/', 221 'android_ndk_root%': '<(base_dir)/third_party/android_tools/ndk/',
219 'android_host_arch%': "<!(uname -m | sed -e 's/i[3456]86/x86/')", 222 'android_host_arch%': "<!(uname -m | sed -e 's/i[3456]86/x86/')",
220 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", 223 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
221 }, 224 },
222 225
223 # Copy conditionally-set variables out one scope. 226 # Copy conditionally-set variables out one scope.
224 'android_ndk_root%': '<(android_ndk_root)', 227 'android_ndk_root%': '<(android_ndk_root)',
225 'host_os%': '<(host_os)', 228 'host_os%': '<(host_os)',
226 229
227 'conditions': [ 230 'conditions': [
228 ['target_arch == "ia32"', { 231 ['target_arch == "ia32"', {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 'android_lib': '<(android_sysroot)/usr/lib', 299 'android_lib': '<(android_sysroot)/usr/lib',
297 }], 300 }],
298 ], 301 ],
299 'android_stlport_include': '<(android_stlport)/stlport', 302 'android_stlport_include': '<(android_stlport)/stlport',
300 'android_stlport_libs': '<(android_stlport)/libs', 303 'android_stlport_libs': '<(android_stlport)/libs',
301 }], 304 }],
302 ], 305 ],
303 'android_stlport_library': 'stlport_static', 306 'android_stlport_library': 'stlport_static',
304 }], # OS=="android" 307 }], # OS=="android"
305 ['host_clang==1', { 308 ['host_clang==1', {
306 'host_cc': '../<(clang_dir)/bin/clang', 309 'host_cc': '<(clang_dir)/bin/clang',
307 'host_cxx': '../<(clang_dir)/bin/clang++', 310 'host_cxx': '<(clang_dir)/bin/clang++',
308 }, { 311 }, {
309 'host_cc': '<!(which gcc)', 312 'host_cc': '<!(which gcc)',
310 'host_cxx': '<!(which g++)', 313 'host_cxx': '<!(which g++)',
311 }], 314 }],
312 ], 315 ],
313 # Default ARM variable settings. 316 # Default ARM variable settings.
314 'arm_version%': 'default', 317 'arm_version%': 'default',
315 'arm_fpu%': 'vfpv3', 318 'arm_fpu%': 'vfpv3',
316 'arm_float_abi%': 'default', 319 'arm_float_abi%': 'default',
317 'arm_thumb': 'default', 320 'arm_thumb': 'default',
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 # it won't depend on the environment at make time. 982 # it won't depend on the environment at make time.
980 'make_global_settings': [ 983 'make_global_settings': [
981 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'], 984 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'],
982 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'], 985 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'],
983 ['CC.host', '<(host_cc)'], 986 ['CC.host', '<(host_cc)'],
984 ['CXX.host', '<(host_cxx)'], 987 ['CXX.host', '<(host_cxx)'],
985 ], 988 ],
986 }], 989 }],
987 ['clang!=1 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"' , { 990 ['clang!=1 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"' , {
988 'make_global_settings': [ 991 'make_global_settings': [
989 ['CC.host', '../<(clang_dir)/bin/clang'], 992 ['CC.host', '<(clang_dir)/bin/clang'],
990 ['CXX.host', '../<(clang_dir)/bin/clang++'], 993 ['CXX.host', '<(clang_dir)/bin/clang++'],
991 ], 994 ],
992 }], 995 }],
993 ['clang==0 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"' , { 996 ['clang==0 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"' , {
994 'target_conditions': [ 997 'target_conditions': [
995 ['_toolset=="host"', { 998 ['_toolset=="host"', {
996 'cflags_cc': [ '-std=gnu++11', ], 999 'cflags_cc': [ '-std=gnu++11', ],
997 }], 1000 }],
998 ], 1001 ],
999 'target_defaults': { 1002 'target_defaults': {
1000 'target_conditions': [ 1003 'target_conditions': [
1001 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}], 1004 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}],
1002 ], 1005 ],
1003 }, 1006 },
1004 }], 1007 }],
1005 ['clang==1 and "<(GENERATOR)"=="ninja"', { 1008 ['clang==1 and "<(GENERATOR)"=="ninja"', {
1006 # See http://crbug.com/110262 1009 # See http://crbug.com/110262
1007 'target_defaults': { 1010 'target_defaults': {
1008 'cflags': [ '-fcolor-diagnostics' ], 1011 'cflags': [ '-fcolor-diagnostics' ],
1009 'xcode_settings': { 'OTHER_CFLAGS': [ '-fcolor-diagnostics' ] }, 1012 'xcode_settings': { 'OTHER_CFLAGS': [ '-fcolor-diagnostics' ] },
1010 }, 1013 },
1011 }], 1014 }],
1012 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' 1015 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
1013 'and OS!="win" and "<(GENERATOR)"=="make"', { 1016 'and OS!="win" and "<(GENERATOR)"=="make"', {
1014 'make_global_settings': [ 1017 'make_global_settings': [
1015 ['CC', '../<(clang_dir)/bin/clang'], 1018 ['CC', '<(clang_dir)/bin/clang'],
1016 ['CXX', '../<(clang_dir)/bin/clang++'], 1019 ['CXX', '<(clang_dir)/bin/clang++'],
1017 ['CC.host', '$(CC)'], 1020 ['CC.host', '$(CC)'],
1018 ['CXX.host', '$(CXX)'], 1021 ['CXX.host', '$(CXX)'],
1019 ], 1022 ],
1020 }], 1023 }],
1021 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' 1024 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
1022 'and OS!="win" and "<(GENERATOR)"=="ninja"', { 1025 'and OS!="win" and "<(GENERATOR)"=="ninja"', {
1023 'make_global_settings': [ 1026 'make_global_settings': [
1024 ['CC', '<(clang_dir)/bin/clang'], 1027 ['CC', '<(clang_dir)/bin/clang'],
1025 ['CXX', '<(clang_dir)/bin/clang++'], 1028 ['CXX', '<(clang_dir)/bin/clang++'],
1026 ['CC.host', '$(CC)'], 1029 ['CC.host', '$(CC)'],
1027 ['CXX.host', '$(CXX)'], 1030 ['CXX.host', '$(CXX)'],
1028 ], 1031 ],
1029 }], 1032 }],
1030 ['clang==1 and OS=="win"', { 1033 ['clang==1 and OS=="win"', {
1031 'make_global_settings': [ 1034 'make_global_settings': [
1032 # On Windows, gyp's ninja generator only looks at CC. 1035 # On Windows, gyp's ninja generator only looks at CC.
1033 ['CC', '../<(clang_dir)/bin/clang-cl'], 1036 ['CC', '<(clang_dir)/bin/clang-cl'],
1034 ], 1037 ],
1035 }], 1038 }],
1036 # TODO(yyanagisawa): supports GENERATOR==make 1039 # TODO(yyanagisawa): supports GENERATOR==make
1037 # make generator doesn't support CC_wrapper without CC 1040 # make generator doesn't support CC_wrapper without CC
1038 # in make_global_settings yet. 1041 # in make_global_settings yet.
1039 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { 1042 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', {
1040 'make_global_settings': [ 1043 'make_global_settings': [
1041 ['CC_wrapper', '<(gomadir)/gomacc'], 1044 ['CC_wrapper', '<(gomadir)/gomacc'],
1042 ['CXX_wrapper', '<(gomadir)/gomacc'], 1045 ['CXX_wrapper', '<(gomadir)/gomacc'],
1043 ['CC.host_wrapper', '<(gomadir)/gomacc'], 1046 ['CC.host_wrapper', '<(gomadir)/gomacc'],
1044 ['CXX.host_wrapper', '<(gomadir)/gomacc'], 1047 ['CXX.host_wrapper', '<(gomadir)/gomacc'],
1045 ], 1048 ],
1046 }], 1049 }],
1047 ], 1050 ],
1048 } 1051 }
OLDNEW
« no previous file with comments | « build/gyp_v8 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698