| Index: build/config/c++/BUILD.gn
|
| diff --git a/build/config/c++/BUILD.gn b/build/config/c++/BUILD.gn
|
| index baad310d724d423cada78d237f0f06b2607b2985..0f594984b21e2c3fd771f52eaedb9358cbd742e0 100644
|
| --- a/build/config/c++/BUILD.gn
|
| +++ b/build/config/c++/BUILD.gn
|
| @@ -19,5 +19,38 @@ config("c++flags") {
|
| "-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir),
|
| "-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir),
|
| ]
|
| + if (is_linux && current_cpu == "arm") {
|
| + cflags_c = [ "-isystem" +
|
| + rebase_path("$prefix/libunwind/$include", root_build_dir) ]
|
| + cflags_cc += [ "-isystem" +
|
| + rebase_path("$prefix/libunwind/$include", root_build_dir) ]
|
| + }
|
| +
|
| + # Make sure we don't link against libc++ or libstdc++.
|
| + ldflags = [ "-nodefaultlibs" ]
|
| +
|
| + # Unfortunately, there's no way to disable linking against just
|
| + # libc++ (besides using clang instead of clang++); -nodefaultlibs
|
| + # removes all of the default libraries, so add back the ones that we
|
| + # need.
|
| + libs = [
|
| + "c",
|
| + "m",
|
| + ]
|
| +
|
| + if (!is_mac) {
|
| + libs += [
|
| + "gcc_s",
|
| + "rt",
|
| + ]
|
| + }
|
| +
|
| + if (is_mac && using_sanitizer) {
|
| + lib_dirs = [ "//third_party/llvm-build/Release+Asserts/lib/clang/$clang_version/lib/darwin" ]
|
| +
|
| + if (is_asan) {
|
| + libs += [ "clang_rt.asan_osx_dynamic" ]
|
| + }
|
| + }
|
| }
|
| }
|
|
|