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

Side by Side Diff: build/config/c++/BUILD.gn

Issue 2964243002: Move c++ configs from buildtools to build/config/c++ [src-side change] (Closed)
Patch Set: Rebase Created 3 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/config/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 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 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 import("//build/config/c++/c++.gni") 5 import("//build/config/c++/c++.gni")
6 6
7 config("c++flags") { 7 config("c++flags") {
8 if (use_custom_libcxx) { 8 if (use_custom_libcxx) {
9 prefix = "//buildtools/third_party" 9 prefix = "//buildtools/third_party"
10 include = "trunk/include" 10 include = "trunk/include"
11 if (!is_clang) { 11 if (!is_clang) {
12 # Gcc has a built-in abs() definition with default visibility. 12 # Gcc has a built-in abs() definition with default visibility.
13 # If it was not disabled, it would conflict with libc++'s abs() 13 # If it was not disabled, it would conflict with libc++'s abs()
14 # with hidden visibility. 14 # with hidden visibility.
15 cflags = [ "-fno-builtin-abs" ] 15 cflags = [ "-fno-builtin-abs" ]
16 } 16 }
17 cflags_cc = [ 17 cflags_cc = [
18 "-nostdinc++", 18 "-nostdinc++",
19 "-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir), 19 "-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir),
20 "-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir), 20 "-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir),
21 ] 21 ]
22 if (is_linux && current_cpu == "arm") {
23 cflags_c = [ "-isystem" +
24 rebase_path("$prefix/libunwind/$include", root_build_dir) ]
25 cflags_cc += [ "-isystem" +
26 rebase_path("$prefix/libunwind/$include", root_build_dir) ]
27 }
28
29 # Make sure we don't link against libc++ or libstdc++.
30 ldflags = [ "-nodefaultlibs" ]
31
32 # Unfortunately, there's no way to disable linking against just
33 # libc++ (besides using clang instead of clang++); -nodefaultlibs
34 # removes all of the default libraries, so add back the ones that we
35 # need.
36 libs = [
37 "c",
38 "m",
39 ]
40
41 if (!is_mac) {
42 libs += [
43 "gcc_s",
44 "rt",
45 ]
46 }
47
48 if (is_mac && using_sanitizer) {
49 lib_dirs = [ "//third_party/llvm-build/Release+Asserts/lib/clang/$clang_ve rsion/lib/darwin" ]
50
51 if (is_asan) {
52 libs += [ "clang_rt.asan_osx_dynamic" ]
53 }
54 }
22 } 55 }
23 } 56 }
OLDNEW
« no previous file with comments | « build/config/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698