Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index e3dfffbacedc83b08e7cf963e773208abaeca049..c54cf94c4342597e877b1cd051116844de84740b 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -326,6 +326,25 @@ config("compiler") { |
cflags_cc += [ "-std=c++11" ] |
} |
+ if (is_nacl_nonsfi) { |
+ cflags += [ |
+ "--target=i686-unknown-nacl", |
+ "--pnacl-bias=x86-32-nonsfi", |
+ "-arch", |
+ "x86-32-nonsfi", |
+ "--pnacl-allow-native", |
+ "--pnacl-allow-translate", |
+ ] |
+ |
+ ldflags += [ |
+ "-arch", |
+ "x86-32-nonsfi", |
+ "--pnacl-allow-native", |
+ ] |
+ |
+ include_dirs = [ "//native_client/src/public/linux_syscalls" ] |
+ } |
+ |
# Pass the same C/C++ flags to the objective C/C++ compiler. |
cflags_objc += cflags_c |
cflags_objcc += cflags_cc |
@@ -743,6 +762,19 @@ config("default_warnings") { |
"-Wno-bitfield-width", |
] |
} |
+ |
+ if (is_nacl_nonsfi) { |
+ cflags += [ |
+ # Disables |
+ "-Wno-c++11-extensions", |
+ "-Wno-char-subscripts", |
+ "-Wno-extra-semi", |
+ "-Wno-unnamed-type-template-args", |
+ "-Wno-unused-private-field", |
+ "-Wno-unused-function", |
+ "-Wno-sign-compare", |
+ ] |
+ } |
} |
} |