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

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

Issue 1395573003: Build nacl_helper_nonsfi with GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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/BUILD.gn ('k') | build/config/nacl/config.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014 The Native Client Authors. All rights reserved. 1 # Copyright (c) 2014 The Native Client 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/nacl/config.gni") 5 import("//build/config/nacl/config.gni")
6 6
7 # Native Client Definitions 7 # Native Client Definitions
8 config("nacl_defines") { 8 config("nacl_defines") {
9 if (is_linux || is_android || is_nacl) { 9 if (is_linux || is_android || is_nacl) {
10 defines = [ 10 defines = [
(...skipping 20 matching lines...) Expand all
31 source_set("nacl_base") { 31 source_set("nacl_base") {
32 public_configs = [ ":nacl_defines" ] 32 public_configs = [ ":nacl_defines" ]
33 if (current_os == "nacl") { 33 if (current_os == "nacl") {
34 public_configs += [ ":nexe_defines" ] 34 public_configs += [ ":nexe_defines" ]
35 } 35 }
36 } 36 }
37 37
38 config("compiler") { 38 config("compiler") {
39 configs = [] 39 configs = []
40 cflags = [] 40 cflags = []
41 ldflags = []
42 libs = []
41 43
42 if (is_clang && current_cpu != "pnacl") { 44 if (is_clang && current_cpu != "pnacl") {
43 # -no-integrated-as is the default in nacl-clang for historical 45 # -no-integrated-as is the default in nacl-clang for historical
44 # compatibility with inline assembly code and so forth. But there 46 # compatibility with inline assembly code and so forth. But there
45 # are no such cases in Chromium code, and -integrated-as is nicer in 47 # are no such cases in Chromium code, and -integrated-as is nicer in
46 # general. Moreover, the IRT must be built using LLVM's assembler 48 # general. Moreover, the IRT must be built using LLVM's assembler
47 # on x86-64 to preserve sandbox base address hiding. Use it 49 # on x86-64 to preserve sandbox base address hiding. Use it
48 # everywhere for consistency (and possibly quicker builds). 50 # everywhere for consistency (and possibly quicker builds).
49 cflags += [ "-integrated-as" ] 51 cflags += [ "-integrated-as" ]
50 } 52 }
53 if (is_nacl_nonsfi) {
54 cflags += [ "--pnacl-allow-translate" ]
55 ldflags += [
56 "--pnacl-allow-translate",
57 "--pnacl-allow-native",
58 "-Wl,--noirt",
59 "-Wt,--noirt",
60 "-Wt,--noirtshim",
61
62 # The clang driver automatically injects -lpthread when using libc++, but
63 # the toolchain doesn't have it yet. To get around this, use
64 # -nodefaultlibs and make each executable target depend on
65 # "//native_client/src/nonsfi/irt:nacl_sys_private".
66 "-nodefaultlibs",
67 ]
68 libs += [
69 "c++",
70 "m",
71 "c",
72 "pnaclmm",
73 ]
74 include_dirs = [ "//native_client/src/public/linux_syscalls" ]
75 }
51 76
52 asmflags = cflags 77 asmflags = cflags
53 } 78 }
54 79
55 config("compiler_codegen") { 80 config("compiler_codegen") {
56 cflags = [] 81 cflags = []
57 82
58 if (is_nacl_irt) { 83 if (is_nacl_irt) {
59 cflags += [ 84 cflags += [
60 # A debugger should be able to unwind IRT call frames. This is 85 # A debugger should be able to unwind IRT call frames. This is
(...skipping 25 matching lines...) Expand all
86 "-Os", 111 "-Os",
87 112
88 # These are omitted from non-IRT libraries to keep the libraries 113 # These are omitted from non-IRT libraries to keep the libraries
89 # themselves small. 114 # themselves small.
90 "-ffunction-sections", 115 "-ffunction-sections",
91 "-fdata-sections", 116 "-fdata-sections",
92 ] 117 ]
93 118
94 ldflags = [ "-Wl,--gc-sections" ] 119 ldflags = [ "-Wl,--gc-sections" ]
95 } 120 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/nacl/config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698