Chromium Code Reviews| Index: Makefile.standalone |
| diff --git a/Makefile.standalone b/Makefile.standalone |
| index 716e8d6fbdd0610832f66ff7c6d6f5cd199cdf1b..a9ab5ad34a95a4f0c5d868aee03afd8905bb56df 100644 |
| --- a/Makefile.standalone |
| +++ b/Makefile.standalone |
| @@ -179,6 +179,9 @@ endif |
| SB_OBJDIR := $(OBJDIR)+Sandboxed |
| SBB_OBJDIR := $(OBJDIR)+SandboxedBrowser |
| +V8_DIR = $(NACL_ROOT)/../v8 |
| +V8_CXXFLAGS := -I$(V8_DIR) |
| + |
| $(info -----------------------------------------------) |
| $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) |
| $(info Using SB_LLVM_PATH = $(SB_LLVM_PATH)) |
| @@ -251,10 +254,19 @@ ifdef GPLUSPLUS |
| OBJDIR := $(OBJDIR)+Gplusplus |
| endif |
| -BASE_CXXFLAGS := -std=gnu++11 -Wall -Wextra -Werror -fno-rtti \ |
| +BASE_CXXFLAGS := -std=gnu++11 -Wall -Wextra -fno-rtti \ |
| -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) -g -pedantic \ |
| $(LLVM_EXTRA_WARNINGS) $(CXX_EXTRA) -MP -MD |
| +ifndef WASM |
|
Jim Stichnoth
2016/04/04 21:26:51
Instead of
ifndef / else / endif
restructure as
Eric Holk
2016/04/04 22:23:22
Done.
|
| + # The WASM code inherits a lot of V8 code, which does not compile with |
| + # -Werror. |
| + BASE_CXXFLAGS := $(BASE_CXXFLAGS) -Werror -DALLOW_WASM=0 |
| +else |
| + BASE_CXXFLAGS := $(BASE_CXXFLAGS) $(V8_CXXFLAGS) -DALLOW_WASM=1 |
| + OBJDIR := $(OBJDIR)+Wasm |
| +endif |
| + |
| CXXFLAGS := $(LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(CXX_DEFINES) $(HOST_FLAGS) \ |
| $(STDLIB_FLAGS) |
| SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(BASE_CXX_DEFINES) \ |
| @@ -315,6 +327,11 @@ ifndef MINIMAL |
| IceTypeConverter.cpp |
| endif |
| +ifdef WASM |
| + SRCS += \ |
| + WasmTranslator.cpp |
| +endif |
| + |
| OBJS=$(patsubst %.cpp, $(OBJDIR)/%.o, $(SRCS)) |
| SB_OBJS=$(patsubst %.cpp, $(SB_OBJDIR)/%.o, $(SRCS)) |
| SBB_OBJS=$(patsubst %.cpp, $(SBB_OBJDIR)/%.o, $(SRCS)) |
| @@ -392,9 +409,18 @@ sb_make_symlink: $(NEXES) |
| compile_only: $(OBJS) |
| +V8_LIBDIR=$(V8_DIR)/out/native/lib.target |
| + |
| +ifdef WASM |
| + V8_LIBS := \ |
| + $(V8_LIBDIR)/libv8.so \ |
| + $(V8_LIBDIR)/libicuuc.so \ |
| + $(V8_LIBDIR)/libicui18n.so |
| +endif |
| + |
| $(OBJDIR)/pnacl-sz: $(OBJS) |
| $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ |
| - -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) |
| + -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) $(V8_LIBS) |
| $(SB_OBJDIR)/pnacl-sz.nonfinal.pexe: $(SB_OBJS) |
| $(SB_CXX) $(SB_LDFLAGS) -o $@ $^ $(SB_LLVM_LDFLAGS) |
| @@ -712,6 +738,7 @@ FORMAT_BLACKLIST += ! -name IceParseInstsTest.cpp |
| FORMAT_BLACKLIST += ! -name IceParseTypesTest.cpp |
| FORMAT_BLACKLIST += ! -name assembler_arm.h |
| FORMAT_BLACKLIST += ! -name assembler_arm.cc |
| +FORMAT_BLACKLIST += ! -path "./wasm-install/*" |
|
Jim Stichnoth
2016/04/04 21:26:51
I think the "*" at the end of the pattern is redun
Eric Holk
2016/04/04 22:23:22
I tried removing the * and it still grabbed all th
Jim Stichnoth
2016/04/04 23:08:20
Yeah, sorry, I was just plain wrong about that.
|
| format: |
| $(CLANG_FORMAT_PATH)/clang-format -style=LLVM -i \ |
| `find . -regex '.*\.\(c\|h\|cpp\)' $(FORMAT_BLACKLIST)` |