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

Side by Side Diff: third_party/libc++/libc++.gyp

Issue 1643613002: Only add -isystem for libc++ for C++ files, not C files. (Closed) Base URL: https://chromium.googlesource.com/chromium/buildtools.git@master
Patch Set: huh Created 4 years, 10 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 | « third_party/libc++/BUILD.gn ('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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 { 5 {
6 'variables': { 6 'variables': {
7 'libcxx_root': '../../buildtools/third_party/libc++', 7 'libcxx_root': '../../buildtools/third_party/libc++',
8 }, 8 },
9 'targets': [ 9 'targets': [
10 { 10 {
11 'target_name': 'libcxx_proxy', 11 'target_name': 'libcxx_proxy',
12 'type': 'none', 12 'type': 'none',
13 'toolsets': ['host', 'target'], 13 'toolsets': ['host', 'target'],
14 'dependencies=': [ 14 'dependencies=': [
15 'libc++', 15 'libc++',
16 ], 16 ],
17 # Do not add dependency on libc++.so to dependents of this target. We 17 # Do not add dependency on libc++.so to dependents of this target. We
18 # don't want to pass libc++.so on the command line to the linker, as that 18 # don't want to pass libc++.so on the command line to the linker, as that
19 # would cause it to be linked into C executables which don't need it. 19 # would cause it to be linked into C executables which don't need it.
20 # Instead, we supply -stdlib=libc++ and let the clang driver decide. 20 # Instead, we supply -stdlib=libc++ and let the clang driver decide.
21 'dependencies_traverse': 0, 21 'dependencies_traverse': 0,
22 'variables': { 22 'variables': {
23 # Don't add this target to the dependencies of targets with type=none. 23 # Don't add this target to the dependencies of targets with type=none.
24 'link_dependency': 1, 24 'link_dependency': 1,
25 }, 25 },
26 'all_dependent_settings': { 26 'all_dependent_settings': {
27 'target_conditions': [ 27 'target_conditions': [
28 ['_type!="none"', { 28 ['_type!="none"', {
29 'cflags': [ 29 'cflags_cc': [
30 '-nostdinc++',
30 '-isystem<(libcxx_root)/trunk/include', 31 '-isystem<(libcxx_root)/trunk/include',
31 '-isystem<(libcxx_root)/../libc++abi/trunk/include', 32 '-isystem<(libcxx_root)/../libc++abi/trunk/include',
32 ], 33 ],
33 'cflags_cc': [
34 '-nostdinc++',
35 ],
36 'ldflags': [ 34 'ldflags': [
37 '-stdlib=libc++', 35 '-stdlib=libc++',
38 # Normally the generator takes care of RPATH. Our case is special 36 # Normally the generator takes care of RPATH. Our case is special
39 # because the generator is unaware of the libc++.so dependency. 37 # because the generator is unaware of the libc++.so dependency.
40 # Note that setting RPATH here is a potential security issue. See: 38 # Note that setting RPATH here is a potential security issue. See:
41 # https://code.google.com/p/gyp/issues/detail?id=315 39 # https://code.google.com/p/gyp/issues/detail?id=315
42 '-Wl,-R,\$$ORIGIN/lib/', 40 '-Wl,-R,\$$ORIGIN/lib/',
43 ], 41 ],
44 'library_dirs': [ 42 'library_dirs': [
45 '<(PRODUCT_DIR)/lib/', 43 '<(PRODUCT_DIR)/lib/',
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 'trunk/src/stdexcept.cpp', 79 'trunk/src/stdexcept.cpp',
82 'trunk/src/string.cpp', 80 'trunk/src/string.cpp',
83 'trunk/src/strstream.cpp', 81 'trunk/src/strstream.cpp',
84 'trunk/src/system_error.cpp', 82 'trunk/src/system_error.cpp',
85 'trunk/src/thread.cpp', 83 'trunk/src/thread.cpp',
86 'trunk/src/typeinfo.cpp', 84 'trunk/src/typeinfo.cpp',
87 'trunk/src/utility.cpp', 85 'trunk/src/utility.cpp',
88 'trunk/src/valarray.cpp', 86 'trunk/src/valarray.cpp',
89 ], 87 ],
90 'cflags': [ 88 'cflags': [
89 '-fPIC',
90 '-fstrict-aliasing',
91 '-pthread',
92 ],
93 'cflags_cc': [
94 '-nostdinc++',
91 '-isystem<(libcxx_root)/trunk/include', 95 '-isystem<(libcxx_root)/trunk/include',
92 '-isystem<(libcxx_root)/../libc++abi/trunk/include', 96 '-isystem<(libcxx_root)/../libc++abi/trunk/include',
93 '-fPIC',
94 '-fstrict-aliasing',
95 '-nostdinc++',
96 '-pthread',
97 '-std=c++11', 97 '-std=c++11',
98 ], 98 ],
99 'cflags_cc!': [ 99 'cflags_cc!': [
100 '-fno-exceptions', 100 '-fno-exceptions',
101 '-fno-rtti', 101 '-fno-rtti',
102 ], 102 ],
103 'cflags!': [ 103 'cflags!': [
104 '-fvisibility=hidden', 104 '-fvisibility=hidden',
105 ], 105 ],
106 'defines': [ 106 'defines': [
(...skipping 10 matching lines...) Expand all
117 'libraries': [ 117 'libraries': [
118 '-lc', 118 '-lc',
119 '-lgcc_s', 119 '-lgcc_s',
120 '-lm', 120 '-lm',
121 '-lpthread', 121 '-lpthread',
122 '-lrt', 122 '-lrt',
123 ], 123 ],
124 }, 124 },
125 ] 125 ]
126 } 126 }
OLDNEW
« no previous file with comments | « third_party/libc++/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698