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

Unified 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, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/nacl/config.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/nacl/BUILD.gn
diff --git a/build/config/nacl/BUILD.gn b/build/config/nacl/BUILD.gn
index 541bb0c475d19e9ec40802a108dc2f0cf5209c3b..6d3244cb5993568039d65a484fcd6e58b57b41db 100644
--- a/build/config/nacl/BUILD.gn
+++ b/build/config/nacl/BUILD.gn
@@ -38,6 +38,8 @@ source_set("nacl_base") {
config("compiler") {
configs = []
cflags = []
+ ldflags = []
+ libs = []
if (is_clang && current_cpu != "pnacl") {
# -no-integrated-as is the default in nacl-clang for historical
@@ -48,6 +50,29 @@ config("compiler") {
# everywhere for consistency (and possibly quicker builds).
cflags += [ "-integrated-as" ]
}
+ if (is_nacl_nonsfi) {
+ cflags += [ "--pnacl-allow-translate" ]
+ ldflags += [
+ "--pnacl-allow-translate",
+ "--pnacl-allow-native",
+ "-Wl,--noirt",
+ "-Wt,--noirt",
+ "-Wt,--noirtshim",
+
+ # The clang driver automatically injects -lpthread when using libc++, but
+ # the toolchain doesn't have it yet. To get around this, use
+ # -nodefaultlibs and make each executable target depend on
+ # "//native_client/src/nonsfi/irt:nacl_sys_private".
+ "-nodefaultlibs",
+ ]
+ libs += [
+ "c++",
+ "m",
+ "c",
+ "pnaclmm",
+ ]
+ include_dirs = [ "//native_client/src/public/linux_syscalls" ]
+ }
asmflags = cflags
}
« 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