| OLD | NEW |
| 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 import("//build/config/sanitizers/sanitizers.gni") | 5 import("//build/config/sanitizers/sanitizers.gni") |
| 6 import("//build/toolchain/toolchain.gni") | 6 import("//build/toolchain/toolchain.gni") |
| 7 | 7 |
| 8 # Sanitizer builds need to override operator new, operator delete, and | 8 # Sanitizer builds need to override operator new, operator delete, and |
| 9 # some exception handling symbols, so libc++ must be a shared library | 9 # some exception handling symbols, so libc++ must be a shared library |
| 10 # to prevent duplicate symbol errors when linking. | 10 # to prevent duplicate symbol errors when linking. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 cflags = [ | 39 cflags = [ |
| 40 "-fPIC", | 40 "-fPIC", |
| 41 "-fstrict-aliasing", | 41 "-fstrict-aliasing", |
| 42 ] | 42 ] |
| 43 cflags_cc = [ | 43 cflags_cc = [ |
| 44 "-nostdinc++", | 44 "-nostdinc++", |
| 45 "-isystem" + rebase_path("trunk/include", root_build_dir), | 45 "-isystem" + rebase_path("trunk/include", root_build_dir), |
| 46 "-isystem" + rebase_path("../libc++abi/trunk/include", root_build_dir), | 46 "-isystem" + rebase_path("../libc++abi/trunk/include", root_build_dir), |
| 47 "-std=c++11", | 47 "-std=c++11", |
| 48 ] | 48 ] |
| 49 if (is_linux && target_cpu == "arm") { |
| 50 cflags_c = [ "-isystem" + rebase_path("../libunwind/trunk/include", root_bui
ld_dir) ] |
| 51 cflags_cc += [ "-isystem" + rebase_path("../libunwind/trunk/include", root_b
uild_dir) ] |
| 52 } |
| 49 } | 53 } |
| 50 | 54 |
| 51 config("no_libstdcpp") { | 55 config("no_libstdcpp") { |
| 52 # Make sure we don't link against libc++ or libstdc++. | 56 # Make sure we don't link against libc++ or libstdc++. |
| 53 ldflags = [ "-nodefaultlibs" ] | 57 ldflags = [ "-nodefaultlibs" ] |
| 54 | 58 |
| 55 # Unfortunately, there's no way to disable linking against just | 59 # Unfortunately, there's no way to disable linking against just |
| 56 # libc++ (besides using clang instead of clang++); -nodefaultlibs | 60 # libc++ (besides using clang instead of clang++); -nodefaultlibs |
| 57 # removes all of the default libraries, so add back the ones that we | 61 # removes all of the default libraries, so add back the ones that we |
| 58 # need. | 62 # need. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 # Normally the generator takes care of RPATH. Our case is special because | 155 # Normally the generator takes care of RPATH. Our case is special because |
| 152 # the generator is unaware of the libc++.so dependency. Note that setting | 156 # the generator is unaware of the libc++.so dependency. Note that setting |
| 153 # RPATH here is a potential security issue. See the following for another | 157 # RPATH here is a potential security issue. See the following for another |
| 154 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=31
5 | 158 # example of this issue: https://code.google.com/p/gyp/issues/detail?id=31
5 |
| 155 "-Wl,-rpath,\$ORIGIN/", | 159 "-Wl,-rpath,\$ORIGIN/", |
| 156 ] | 160 ] |
| 157 } | 161 } |
| 158 | 162 |
| 159 lib_dirs = [ root_build_dir ] | 163 lib_dirs = [ root_build_dir ] |
| 160 } | 164 } |
| OLD | NEW |