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

Side by Side Diff: Makefile.standalone

Issue 1572863003: Fix the g++ build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove comment Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/IceELFObjectWriter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # The following variables will likely need to be modified, depending on where 1 # The following variables will likely need to be modified, depending on where
2 # and how you built LLVM & Clang. They can be overridden in a command-line 2 # and how you built LLVM & Clang. They can be overridden in a command-line
3 # invocation of make, like: 3 # invocation of make, like:
4 # 4 #
5 # make LLVM_SRC_PATH=<path> LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> \ 5 # make LLVM_SRC_PATH=<path> LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> \
6 # PNACL_BIN_PATH=<path> ... 6 # PNACL_BIN_PATH=<path> ...
7 # 7 #
8 8
9 # LLVM_SRC_PATH is the path to the root of the checked out source code. This 9 # LLVM_SRC_PATH is the path to the root of the checked out source code. This
10 # directory should contain the configure script, the include/ and lib/ 10 # directory should contain the configure script, the include/ and lib/
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 SB_CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=1 87 SB_CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=1
88 CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=0 88 CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=0
89 89
90 ifdef NOASSERT 90 ifdef NOASSERT
91 ASSERTIONS = -DNDEBUG 91 ASSERTIONS = -DNDEBUG
92 else 92 else
93 ASSERTIONS = 93 ASSERTIONS =
94 OBJDIR := $(OBJDIR)+Asserts 94 OBJDIR := $(OBJDIR)+Asserts
95 endif 95 endif
96 96
97 # Use g++ to compile, to check for errors/warnings that clang++ might have
98 # missed. It's unlikely to link, unless LLVM was also built with g++, so the
99 # compile_only target should be used.
100 ifdef GPLUSPLUS
101 CXX = CCACHE_CPP2=yes $(CCACHE) g++
102 STDLIB_FLAGS =
103 LLVM_EXTRA_WARNINGS="-Wno-unknown-pragmas -Wno-unused-parameter \
104 -Wno-comment -Wno-enum-compare -Wno-strict-aliasing"
105 OBJDIR := $(OBJDIR)+Gplusplus
106 endif
107
108 ifdef UBSAN 97 ifdef UBSAN
109 OBJDIR := $(OBJDIR)+UBSan 98 OBJDIR := $(OBJDIR)+UBSan
110 CXX_EXTRA += -fsanitize=undefined -fno-sanitize=vptr \ 99 CXX_EXTRA += -fsanitize=undefined -fno-sanitize=vptr \
111 -fno-sanitize=nonnull-attribute 100 -fno-sanitize=nonnull-attribute
112 LD_EXTRA += -fsanitize=undefined 101 LD_EXTRA += -fsanitize=undefined
113 endif 102 endif
114 103
115 ifdef UBSAN_TRAP 104 ifdef UBSAN_TRAP
116 OBJDIR := $(OBJDIR)+UBSan_Trap 105 OBJDIR := $(OBJDIR)+UBSan_Trap
117 CXX_EXTRA += -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error \ 106 CXX_EXTRA += -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error \
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 -L$(SB_LLVM_PATH)/lib 174 -L$(SB_LLVM_PATH)/lib
186 175
187 CCACHE := `command -v ccache` 176 CCACHE := `command -v ccache`
188 CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++ 177 CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++
189 SB_CXX := CCACHE_CPP2=yes $(CCACHE) $(PNACL_BIN_PATH)/pnacl-clang++ 178 SB_CXX := CCACHE_CPP2=yes $(CCACHE) $(PNACL_BIN_PATH)/pnacl-clang++
190 SB_TRANSLATE := $(PNACL_BIN_PATH)/pnacl-translate 179 SB_TRANSLATE := $(PNACL_BIN_PATH)/pnacl-translate
191 180
192 # Extra warnings that LLVM's build system adds in addition to -Wall. 181 # Extra warnings that LLVM's build system adds in addition to -Wall.
193 LLVM_EXTRA_WARNINGS := -Wcovered-switch-default 182 LLVM_EXTRA_WARNINGS := -Wcovered-switch-default
194 183
184 # Use g++ to compile, to check for errors/warnings that clang++ might have
185 # missed. It's unlikely to link, unless LLVM was also built with g++, so the
186 # compile_only target should be used. Note: This ifdef section is deliberately
187 # placed here instead of with the other ifdef sections, so that its redefinition
188 # of CXX/STDLIB_FLAGS/LLVM_EXTRA_WARNINGS follows their normal definitions.
189 ifdef GPLUSPLUS
190 CXX := CCACHE_CPP2=yes $(CCACHE) g++
191 STDLIB_FLAGS :=
192 LLVM_EXTRA_WARNINGS := -Wno-unknown-pragmas -Wno-unused-parameter \
193 -Wno-comment -Wno-enum-compare -Wno-strict-aliasing \
194 -Wno-return-type
195 OBJDIR := $(OBJDIR)+Gplusplus
196 endif
197
195 BASE_CXXFLAGS := -std=gnu++11 -Wall -Wextra -Werror -fno-rtti \ 198 BASE_CXXFLAGS := -std=gnu++11 -Wall -Wextra -Werror -fno-rtti \
196 -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) -g -pedantic \ 199 -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) -g -pedantic \
197 $(LLVM_EXTRA_WARNINGS) $(CXX_EXTRA) 200 $(LLVM_EXTRA_WARNINGS) $(CXX_EXTRA)
198 201
199 CXXFLAGS := $(LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(CXX_DEFINES) $(HOST_FLAGS) \ 202 CXXFLAGS := $(LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(CXX_DEFINES) $(HOST_FLAGS) \
200 $(STDLIB_FLAGS) 203 $(STDLIB_FLAGS)
201 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(SB_CXX_DEFINES) 204 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(SB_CXX_DEFINES)
202 205
203 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ 206 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \
204 $(LD_EXTRA) $(STDLIB_FLAGS) 207 $(LD_EXTRA) $(STDLIB_FLAGS)
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html 513 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html
511 514
512 docs: 515 docs:
513 make -C docs -f Makefile.standalone 516 make -C docs -f Makefile.standalone
514 517
515 clean: 518 clean:
516 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json 519 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json
517 520
518 clean-all: clean 521 clean-all: clean
519 rm -rf build/ crosstest/Output/ 522 rm -rf build/ crosstest/Output/
OLDNEW
« no previous file with comments | « no previous file | src/IceELFObjectWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698