| # Copyright 2017 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/sysroot.gni") |
| |
| config("compiler") { |
| ldflags = [ |
| "-static-libstdc++", |
| # Set rpath to find dynamically linked libraries placed next to executables in the host |
| # build directory. |
| "-Wl,-rpath=\$ORIGIN/", |
| ] |
| # TODO(TC-74) The implicitly linked static libc++.a depends on these. |
| libs = [ |
| "dl", |
| "pthread", |
| ] |
| lib_dirs = [ rebase_path("//buildtools/${host_platform}/clang/lib") ] |
| configs = [ ":sysroot" ] |
| } |
| |
| config("sysroot") { |
| cflags = [ "--sysroot=$sysroot" ] |
| ldflags = cflags |
| asmflags = cflags |
| } |