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

Side by Side Diff: build/common.gypi

Issue 1413863003: mac: In static library builds, link against a static libc++.a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 5238 matching lines...) Expand 10 before | Expand all | Expand 10 after
5249 # grown larger than 4GB, which dsymutil can't handle. Reduce 5249 # grown larger than 4GB, which dsymutil can't handle. Reduce
5250 # the amount of debug symbols. 5250 # the amount of debug symbols.
5251 '-fno-standalone-debug', # See http://crbug.com/479841 5251 '-fno-standalone-debug', # See http://crbug.com/479841
5252 ] 5252 ]
5253 }, 5253 },
5254 }], 5254 }],
5255 ], 5255 ],
5256 }, # configuration "Release" 5256 }, # configuration "Release"
5257 }, # configurations 5257 }, # configurations
5258 'xcode_settings': { 5258 'xcode_settings': {
5259 # Tell the compiler to use libc++'s headers and the linker to link
5260 # against libc++. The latter part normally requires OS X 10.7, but
5261 # we still support running on 10.6. How does this work? Two parts:
5262 # 1. Chromium's clang doesn't error on -mmacosx-version-min=10.6
5263 # combined with -stdlib=libc++ (it normally silently produced a
5264 # binary that doesn't run on 10.6)
Mark Mentovai 2015/10/23 13:56:36 Is this a local change that we’ve made to clang, o
Nico 2015/10/23 15:39:29 That's a local change Apple has in their branch. W
5265 # 2. Further down, library_dirs is set to third_party/libc++-static,
5266 # which contains a static libc++.a library. The linker then links
5267 # against that instead of again /usr/lib/libc++.dylib when it sees
Mark Mentovai 2015/10/23 13:56:36 again → against
Nico 2015/10/23 15:39:29 Done.
5268 # the -lc++ flag added by the driver.
5269 #
5270 # In component builds, just link to the system libc++.
5271 # This has the effect of making everything depend on libc++, which
5272 # means component-build binaries won't run on 10.6 (no libc++ there),
5273 # but for a developer-only configuration that's ok. (We don't want
5274 # to raise the deployment target yet so that official and dev builds
5275 # have the same deployment target. This affects things like which
5276 # functions are considered deprecated.)
5277 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++
5278
5259 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic 5279 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
5260 # (Equivalent to -fPIC) 5280 # (Equivalent to -fPIC)
5261 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min 5281 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
5262 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', 5282 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
5263 # Keep pch files below xcodebuild/. 5283 # Keep pch files below xcodebuild/.
5264 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHe aders', 5284 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHe aders',
5265 'OTHER_CFLAGS': [ 5285 'OTHER_CFLAGS': [
5266 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO' 5286 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO'
5267 # xcode_setting, but not until all downstream projects' mac bots are 5287 # xcode_setting, but not until all downstream projects' mac bots are
5268 # using xcode >= 4.6, because that's when the default value of the 5288 # using xcode >= 4.6, because that's when the default value of the
5269 # flag in the compiler switched. Pre-4.6, the value 'NO' for that 5289 # flag in the compiler switched. Pre-4.6, the value 'NO' for that
5270 # setting is a no-op as far as xcode is concerned, but the compiler 5290 # setting is a no-op as far as xcode is concerned, but the compiler
5271 # behaves differently based on whether -fno-strict-aliasing is 5291 # behaves differently based on whether -fno-strict-aliasing is
5272 # specified or not. 5292 # specified or not.
5273 '-fno-strict-aliasing', # See http://crbug.com/32204. 5293 '-fno-strict-aliasing', # See http://crbug.com/32204.
5274 ], 5294 ],
5275 'conditions': [
5276 ['component=="shared_library"', {
5277 # In component builds, link to the system libc++. This requires
5278 # OS X 10.7, but we currently pass -mmacosx-version-min=10.6.
5279 # Xcode's clang complains about this, but our open-source bundled
5280 # chromium clang doesn't. This has the effect of making
5281 # everything depend on libc++, which means component-build
5282 # binaries won't run on 10.6 (no libc++ there), but for a
5283 # developer-only configuration that's ok.
5284 # (We don't want to raise the deployment target yet so that
5285 # official and dev builds have the same deployment target. This
5286 # affects things like which functions are considered deprecated.)
5287 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++
5288 }],
5289 ],
5290 }, 5295 },
5291 'target_conditions': [ 5296 'target_conditions': [
5297 ['>(nacl_untrusted_build)==0 and component=="static_library"', {
5298 # See the comment for CLANG_CXX_LIBRARY above for what this does.
5299 # The NaCl toolchains have their own toolchain and don't need this.
5300 'library_dirs': [
5301 '<(DEPTH)/third_party/libc++-static',
Nico 2015/10/23 13:05:33 The alternative here would be to use clang instead
Mark Mentovai 2015/10/23 13:56:36 Nico (vacation Fri Oct 23) wrote:
5302 ],
5303 }],
5292 ['_type=="executable"', { 5304 ['_type=="executable"', {
5293 'postbuilds': [ 5305 'postbuilds': [
5294 { 5306 {
5295 # Arranges for data (heap) pages to be protected against 5307 # Arranges for data (heap) pages to be protected against
5296 # code execution when running on Mac OS X 10.7 ("Lion"), and 5308 # code execution when running on Mac OS X 10.7 ("Lion"), and
5297 # ensures that the position-independent executable (PIE) bit 5309 # ensures that the position-independent executable (PIE) bit
5298 # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). 5310 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
5299 'variables': { 5311 'variables': {
5300 # Define change_mach_o_flags in a variable ending in _path 5312 # Define change_mach_o_flags in a variable ending in _path
5301 # so that GYP understands it's a path and performs proper 5313 # so that GYP understands it's a path and performs proper
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
6297 # settings in target dicts. SYMROOT is a special case, because many other 6309 # settings in target dicts. SYMROOT is a special case, because many other
6298 # Xcode variables depend on it, including variables such as 6310 # Xcode variables depend on it, including variables such as
6299 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 6311 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
6300 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 6312 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
6301 # files to appear (when present) in the UI as actual files and not red 6313 # files to appear (when present) in the UI as actual files and not red
6302 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 6314 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
6303 # and therefore SYMROOT, needs to be set at the project level. 6315 # and therefore SYMROOT, needs to be set at the project level.
6304 'SYMROOT': '<(DEPTH)/xcodebuild', 6316 'SYMROOT': '<(DEPTH)/xcodebuild',
6305 }, 6317 },
6306 } 6318 }
OLDNEW
« no previous file with comments | « DEPS ('k') | chrome/tools/build/mac/verify_order » ('j') | chrome/tools/build/mac/verify_order » ('J')

Powered by Google App Engine
This is Rietveld 408576698