Chromium Code Reviews| Index: build/config/nacl/BUILD.gn |
| diff --git a/build/config/nacl/BUILD.gn b/build/config/nacl/BUILD.gn |
| index 541bb0c475d19e9ec40802a108dc2f0cf5209c3b..a441cb14eb5ceedc88049dc7b4e71d14748e029c 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 explicitly link irt_browser_lib to satisfy libc++'s |
|
Mark Seaborn
2015/10/24 17:07:49
This part isn't linking irt_browser_lib, unlike th
Petr Hosek
2015/10/24 22:11:49
Done.
|
| + # pthread dependency. |
| + "-nodefaultlibs", |
| + ] |
| + libs += [ |
| + "c++", |
| + "m", |
| + "c", |
| + "pnaclmm", |
| + ] |
| + include_dirs = [ "//native_client/src/public/linux_syscalls" ] |
| + } |
| asmflags = cflags |
| } |