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

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

Issue 2784063002: Config changes to support target_os="fuchsia" (Closed)
Patch Set: review fixes 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
« no previous file with comments | « build/config/compiler/compiler.gni ('k') | build/config/fuchsia/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2017 The Fuchsia Authors. All rights reserved.
Nico 2017/05/11 16:42:05 Probably The Chromium given it's in src?
scottmg 2017/05/11 17:16:17 Aha, that would be where I copied the Wno-error fr
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("werror") {
Nico 2017/05/11 16:42:05 This is in build/config/compiler/BUILD.gn too, can
scottmg 2017/05/11 17:16:17 Removed both werror and icf. Werror is picked up f
11 cflags = [
12 "-Werror",
13 # Do not add additional -Wno-error to this config.
14 ]
15 }
16
17 config("icf") {
18 # This changes C/C++ semantics and might be incompatible with third-party
19 # code that relies on function pointers comparison.
20 ldflags = [ "-Wl,--icf=all" ]
21 }
22
23 config("compiler") {
24 cflags = []
25 cflags_c = [ "-std=c11" ]
26 cflags_cc = [ "-std=c++14" ]
27 ldflags = [ "-Wl,--threads" ]
28 configs = [
29 ":compiler_sysroot",
30 ":compiler_target",
31 ":icf",
32 ":werror",
33 ]
34 asmflags = cflags + cflags_c
35
36 libs = [
37 "mxio",
38 "magenta",
39 "unwind",
40 ]
41 }
42
43 config("compiler_sysroot") {
44 # The sole purpose of SYSROOT_VERSION is to change the command line on every
45 # sysroot update so as to force rebuilds.
46 defines = [ "SYSROOT_VERSION=$sysroot_version" ]
47 cflags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ]
48 ldflags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ]
49 asmflags = cflags
50 }
51
52 config("compiler_target") {
53 cflags = []
54 ldflags = []
55 if (current_cpu == "arm64") {
56 cflags += [ "--target=aarch64-fuchsia" ]
57 ldflags += [ "--target=aarch64-fuchsia" ]
58 } else if (current_cpu == "x64") {
59 cflags += [ "--target=x86_64-fuchsia" ]
60 ldflags += [ "--target=x86_64-fuchsia" ]
61 } else {
62 assert(false, "Unsupported architecture")
63 }
64 asmflags = cflags
65 }
OLDNEW
« no previous file with comments | « build/config/compiler/compiler.gni ('k') | build/config/fuchsia/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698