Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/fuchsia/config.gni") | |
| 5 import("//build/config/sysroot.gni") | 6 import("//build/config/sysroot.gni") |
| 6 | 7 |
| 7 assert(is_fuchsia) | 8 assert(is_fuchsia) |
| 8 assert(is_posix) | 9 assert(is_posix) |
| 9 | 10 |
| 10 config("compiler") { | 11 config("compiler") { |
| 11 defines = [ "SYSROOT_VERSION=$sysroot_version" ] | 12 defines = [ "SYSROOT_VERSION=$sysroot_version" ] |
| 12 cflags = [] | 13 cflags = [] |
| 13 ldflags = [] | 14 ldflags = [] |
| 14 if (current_cpu == "arm64") { | 15 if (current_cpu == "arm64") { |
| 15 cflags += [ "--target=aarch64-fuchsia" ] | 16 cflags += [ "--target=aarch64-fuchsia" ] |
| 16 ldflags += [ "--target=aarch64-fuchsia" ] | 17 ldflags += [ "--target=aarch64-fuchsia" ] |
| 17 } else if (current_cpu == "x64") { | 18 } else if (current_cpu == "x64") { |
| 18 cflags += [ "--target=x86_64-fuchsia" ] | 19 cflags += [ "--target=x86_64-fuchsia" ] |
| 19 ldflags += [ "--target=x86_64-fuchsia" ] | 20 ldflags += [ "--target=x86_64-fuchsia" ] |
| 20 } else { | 21 } else { |
| 21 assert(false, "Unsupported architecture") | 22 assert(false, "Unsupported architecture") |
| 22 } | 23 } |
| 23 asmflags = cflags | 24 asmflags = cflags |
| 24 | 25 |
| 26 # TODO(thakis): Once Fuchsia's libclang_rt.builtin no longer has upstream | |
| 27 # patches, we might want to make tools/clang/scripts/update.py build it | |
| 28 # and bundle it with the clang package instead of using the library from | |
| 29 # the SDK. | |
|
scottmg
2017/05/19 19:53:55
Maybe link crbug.com/724204 here.
Nico
2017/05/19 19:54:56
Done.
| |
| 30 ldflags += [ | |
| 31 "-resource-dir", | |
| 32 rebase_path(fuchsia_sdk, root_build_dir) + "/toolchain_libs/clang/5.0.0", | |
| 33 ] | |
| 34 | |
| 25 libs = [ | 35 libs = [ |
| 26 "mxio", | 36 "mxio", |
| 27 "magenta", | 37 "magenta", |
| 28 "unwind", | 38 "unwind", |
| 29 ] | 39 ] |
| 30 } | 40 } |
| OLD | NEW |