OLD | NEW |
---|---|
(Empty) | |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 import("//build/config/sysroot.gni") | |
6 | |
7 assert(is_fuchsia) | |
8 assert(is_posix) | |
9 | |
10 config("compiler") { | |
11 configs = [ | |
12 ":compiler_sysroot", | |
13 ":compiler_target", | |
14 ] | |
15 | |
16 libs = [ | |
17 "mxio", | |
18 "magenta", | |
19 "unwind", | |
20 ] | |
21 } | |
22 | |
23 config("compiler_sysroot") { | |
24 # The sole purpose of SYSROOT_VERSION is to change the command line on every | |
25 # sysroot update so as to force rebuilds. | |
26 defines = [ "SYSROOT_VERSION=$sysroot_version" ] | |
27 cflags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ] | |
Nico
2017/05/11 18:04:14
https://cs.chromium.org/chromium/src/build/config/
scottmg
2017/05/11 18:16:36
Huh, I thought it didn't (I have no idea why I wou
| |
28 ldflags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ] | |
29 asmflags = cflags | |
30 } | |
31 | |
32 config("compiler_target") { | |
33 cflags = [] | |
34 ldflags = [] | |
35 if (current_cpu == "arm64") { | |
36 cflags += [ "--target=aarch64-fuchsia" ] | |
37 ldflags += [ "--target=aarch64-fuchsia" ] | |
38 } else if (current_cpu == "x64") { | |
39 cflags += [ "--target=x86_64-fuchsia" ] | |
40 ldflags += [ "--target=x86_64-fuchsia" ] | |
41 } else { | |
42 assert(false, "Unsupported architecture") | |
43 } | |
44 asmflags = cflags | |
45 } | |
OLD | NEW |