Index: Makefile.rules |
diff --git a/Makefile.rules b/Makefile.rules |
index c8c971f6b2810e5aa3d7942d0c7af35de5c85c22..3b7dab1c3bdd7af58e9085881bcb2fe040d89b86 100644 |
--- a/Makefile.rules |
+++ b/Makefile.rules |
@@ -322,9 +322,9 @@ endif |
ifeq ($(ENABLE_CXX1Y),1) |
CXX.Flags += -std=c++1y |
else |
- ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) |
- # MinGW and Cygwin are a bit stricter and lack things like |
- # 'strdup', 'stricmp', etc in c++11 mode. |
+ ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW NativeClient)) |
+ # MinGW, Cygwin, and NativeClient+newlib are a bit stricter and |
+ # lack things like 'strdup', 'stricmp', etc in c++11 mode. |
CXX.Flags += -std=gnu++11 |
else |
CXX.Flags += -std=c++11 |
@@ -664,6 +664,23 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) |
endif |
endif |
+#@LOCALMOD-BEGIN |
+ifeq ($(PNACL_BROWSER_TRANSLATOR),1) |
+ CPP.Flags += -DPNACL_BROWSER_TRANSLATOR |
+ # NOTE: we specify --noirt to tell the driver that we should link |
+ # against private (non-stable, non-IRT) libraries for the |
+ # sandboxed translator. This could have been specified directly, |
+ # except that LLVM slips in -lpthread elsewhere in the build system, |
+ # and we need it to use -lpthread_private instead. |
+ LIBS += -Wl,--noirt -lsrpc -limc_syscalls -lplatform -lgio -lpthread |
+ ifeq ($(USE_TCMALLOC),1) |
+ # Note: -ltcmalloc_minimal needs to stay last on the link line |
+ LIBS += -ltcmalloc_minimal |
+ CXX.Flags += -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free |
+ C.Flags += -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free |
+ endif |
+endif |
+# @LOCALMOD-END |
#---------------------------------------------------------- |
# Options To Invoke Tools |