Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: build/config/fuchsia/BUILD.gn

Issue 2784063002: Config changes to support target_os="fuchsia" (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 cflags = []
12 cflags_c = [ "-std=c11" ]
13 cflags_cc = [ "-std=c++14" ]
Nico 2017/05/11 17:43:37 Hm, I'd pretty strongly prefer if we could use the
scottmg 2017/05/11 17:52:53 OK, I was thinking it would match the OS headers,
14 ldflags = [ "-Wl,--threads" ]
15 configs = [
16 ":compiler_sysroot",
17 ":compiler_target",
18 ]
19 asmflags = cflags + cflags_c
20
21 libs = [
22 "mxio",
23 "magenta",
24 "unwind",
25 ]
26 }
27
28 config("compiler_sysroot") {
29 # The sole purpose of SYSROOT_VERSION is to change the command line on every
30 # sysroot update so as to force rebuilds.
31 defines = [ "SYSROOT_VERSION=$sysroot_version" ]
32 cflags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ]
33 ldflags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ]
34 asmflags = cflags
35 }
36
37 config("compiler_target") {
38 cflags = []
39 ldflags = []
40 if (current_cpu == "arm64") {
41 cflags += [ "--target=aarch64-fuchsia" ]
42 ldflags += [ "--target=aarch64-fuchsia" ]
43 } else if (current_cpu == "x64") {
44 cflags += [ "--target=x86_64-fuchsia" ]
45 ldflags += [ "--target=x86_64-fuchsia" ]
46 } else {
47 assert(false, "Unsupported architecture")
48 }
49 asmflags = cflags
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698