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

Side by Side Diff: build/common.gypi

Issue 10827214: GYP changes for Clang/Android build. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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/android/envsetup.sh ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # IMPORTANT: 5 # IMPORTANT:
6 # Please don't directly include this file if you are building via gyp_chromium, 6 # Please don't directly include this file if you are building via gyp_chromium,
7 # since gyp_chromium is automatically forcing its inclusion. 7 # since gyp_chromium is automatically forcing its inclusion.
8 { 8 {
9 # Variables expected to be overriden on the GYP command line (-D) or by 9 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi. 10 # ~/.gyp/include.gypi.
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 'cflags': [ 2215 'cflags': [
2216 '-march=armv7-a', 2216 '-march=armv7-a',
2217 '-mtune=cortex-a8', 2217 '-mtune=cortex-a8',
2218 '-mfloat-abi=<(arm_float_abi)', 2218 '-mfloat-abi=<(arm_float_abi)',
2219 ], 2219 ],
2220 'conditions': [ 2220 'conditions': [
2221 ['arm_neon==1', { 2221 ['arm_neon==1', {
2222 'cflags': [ '-mfpu=neon', ], 2222 'cflags': [ '-mfpu=neon', ],
2223 }, { 2223 }, {
2224 'cflags': [ '-mfpu=<(arm_fpu)', ], 2224 'cflags': [ '-mfpu=<(arm_fpu)', ],
2225 }] 2225 }],
2226 ], 2226 ],
2227 }], 2227 }],
2228 ['OS=="android"', { 2228 ['OS=="android"', {
2229 # Most of the following flags are derived from what Android 2229 # Most of the following flags are derived from what Android
2230 # uses by default when building for arm, reference for which 2230 # uses by default when building for arm, reference for which
2231 # can be found in the following file in the Android NDK: 2231 # can be found in the following file in the Android NDK:
2232 # toolchains/arm-linux-androideabi-4.4.3/setup.mk 2232 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2233 'cflags': [ 2233 'cflags': [
2234 # The tree-sra optimization (scalar replacement for 2234 # The tree-sra optimization (scalar replacement for
2235 # aggregates enabling subsequent optimizations) leads to 2235 # aggregates enabling subsequent optimizations) leads to
(...skipping 24 matching lines...) Expand all
2260 '-mtune=xscale', 2260 '-mtune=xscale',
2261 '-msoft-float', 2261 '-msoft-float',
2262 ], 2262 ],
2263 'defines': [ 2263 'defines': [
2264 '__ARM_ARCH_5__', 2264 '__ARM_ARCH_5__',
2265 '__ARM_ARCH_5T__', 2265 '__ARM_ARCH_5T__',
2266 '__ARM_ARCH_5E__', 2266 '__ARM_ARCH_5E__',
2267 '__ARM_ARCH_5TE__', 2267 '__ARM_ARCH_5TE__',
2268 ], 2268 ],
2269 }], 2269 }],
2270 ['clang==1', {
2271 'cflags!': [
2272 # Clang does not support the following options.
2273 '-mthumb-interwork',
2274 '-finline-limit=64',
2275 '-fno-tree-sra',
2276 '-Wno-psabi',
2277 ],
2278 }],
2270 ], 2279 ],
2271 }], 2280 }],
2272 ], 2281 ],
2273 }], 2282 }],
2274 ], 2283 ],
2275 }], 2284 }],
2276 ['linux_fpic==1', { 2285 ['linux_fpic==1', {
2277 'cflags': [ 2286 'cflags': [
2278 '-fPIC', 2287 '-fPIC',
2279 ], 2288 ],
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)', 2585 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)',
2577 '-lc', 2586 '-lc',
2578 '-ldl', 2587 '-ldl',
2579 '-lstdc++', 2588 '-lstdc++',
2580 '-lm', 2589 '-lm',
2581 ], 2590 ],
2582 'conditions': [ 2591 'conditions': [
2583 ['android_upstream_bringup==1', { 2592 ['android_upstream_bringup==1', {
2584 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',], 2593 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',],
2585 }], 2594 }],
2595 ['clang==1', {
2596 'cflags': [
2597 # Work around incompatibilities between bionic and clang
2598 # headers.
2599 '-D__compiler_offsetof=__builtin_offsetof',
2600 '-Dnan=__builtin_nan',
2601 ],
2602 'conditions': [
2603 ['target_arch=="arm"', {
2604 'cflags': [
2605 '-target arm-linux-androideabi',
2606 '-mllvm -arm-enable-ehabi',
2607 ],
2608 'ldflags': [
2609 '-target arm-linux-androideabi',
2610 ],
2611 }],
2612 ['target_arch=="ia32"', {
2613 'cflags': [
2614 '-target x86-linux-androideabi',
2615 ],
2616 'ldflags': [
2617 '-target x86-linux-androideabi',
2618 ],
2619 }],
2620 ],
2621 }],
2586 ['android_build_type==0', { 2622 ['android_build_type==0', {
2587 'defines': [ 2623 'defines': [
2588 # The NDK has these things, but doesn't define the constants 2624 # The NDK has these things, but doesn't define the constants
2589 # to say that it does. Define them here instead. 2625 # to say that it does. Define them here instead.
2590 'HAVE_SYS_UIO_H', 2626 'HAVE_SYS_UIO_H',
2591 ], 2627 ],
2592 'cflags': [ 2628 'cflags': [
2593 '--sysroot=<(android_ndk_sysroot)', 2629 '--sysroot=<(android_ndk_sysroot)',
2594 ], 2630 ],
2595 'ldflags': [ 2631 'ldflags': [
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
3277 }, 3313 },
3278 }, 3314 },
3279 }], 3315 }],
3280 ['enable_new_npdevice_api==1', { 3316 ['enable_new_npdevice_api==1', {
3281 'target_defaults': { 3317 'target_defaults': {
3282 'defines': [ 3318 'defines': [
3283 'ENABLE_NEW_NPDEVICE_API', 3319 'ENABLE_NEW_NPDEVICE_API',
3284 ], 3320 ],
3285 }, 3321 },
3286 }], 3322 }],
3287 ['clang==1 and OS!="android"', { 3323 ['clang==1', {
3288 'make_global_settings': [ 3324 'make_global_settings': [
3289 ['CC', '<(make_clang_dir)/bin/clang'], 3325 ['CC', '<(make_clang_dir)/bin/clang'],
3290 ['CXX', '<(make_clang_dir)/bin/clang++'], 3326 ['CXX', '<(make_clang_dir)/bin/clang++'],
3291 ['LINK', '$(CXX)'], 3327 ['LINK', '$(CXX)'],
3292 ['CC.host', '$(CC)'], 3328 ['CC.host', '$(CC)'],
3293 ['CXX.host', '$(CXX)'], 3329 ['CXX.host', '$(CXX)'],
3294 ['LINK.host', '$(LINK)'], 3330 ['LINK.host', '$(LINK)'],
3295 ], 3331 ],
3296 }], 3332 }],
3297 ['OS=="android" and "<(GENERATOR)"!="ninja"', { 3333 ['OS=="android" and clang==0 and "<(GENERATOR)"!="ninja"', {
3298 # Hardcode the compiler names in the Makefile so that 3334 # Hardcode the compiler names in the Makefile so that
3299 # it won't depend on the environment at make time. 3335 # it won't depend on the environment at make time.
3300 'make_global_settings': [ 3336 'make_global_settings': [
3301 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g cc)'], 3337 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g cc)'],
3302 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*- g++)'], 3338 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*- g++)'],
3303 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/* -gcc)'], 3339 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/* -gcc)'],
3304 ['CC.host', '<!(which gcc)'], 3340 ['CC.host', '<!(which gcc)'],
3305 ['CXX.host', '<!(which g++)'], 3341 ['CXX.host', '<!(which g++)'],
3306 ['LINK.host', '<!(which g++)'], 3342 ['LINK.host', '<!(which g++)'],
3307 ], 3343 ],
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
3346 # settings in target dicts. SYMROOT is a special case, because many other 3382 # settings in target dicts. SYMROOT is a special case, because many other
3347 # Xcode variables depend on it, including variables such as 3383 # Xcode variables depend on it, including variables such as
3348 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 3384 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3349 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 3385 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3350 # files to appear (when present) in the UI as actual files and not red 3386 # files to appear (when present) in the UI as actual files and not red
3351 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 3387 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3352 # and therefore SYMROOT, needs to be set at the project level. 3388 # and therefore SYMROOT, needs to be set at the project level.
3353 'SYMROOT': '<(DEPTH)/xcodebuild', 3389 'SYMROOT': '<(DEPTH)/xcodebuild',
3354 }, 3390 },
3355 } 3391 }
OLDNEW
« no previous file with comments | « build/android/envsetup.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698