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

Side by Side Diff: Makefile.standalone

Issue 1190413004: Allow pnacl-sz to be compiled to textual bitcode records. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 years, 6 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/IceCompileServer.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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 OBJDIR := $(OBJDIR)+Min 79 OBJDIR := $(OBJDIR)+Min
80 BASE_CXX_DEFINES += -DALLOW_DUMP=0 -DALLOW_LLVM_CL=0 -DALLOW_LLVM_IR=0 \ 80 BASE_CXX_DEFINES += -DALLOW_DUMP=0 -DALLOW_LLVM_CL=0 -DALLOW_LLVM_IR=0 \
81 -DALLOW_LLVM_IR_AS_INPUT=0 -DALLOW_DISABLE_IR_GEN=0 \ 81 -DALLOW_LLVM_IR_AS_INPUT=0 -DALLOW_DISABLE_IR_GEN=0 \
82 -DALLOW_MINIMAL_BUILD=1 82 -DALLOW_MINIMAL_BUILD=1
83 else 83 else
84 BASE_CXX_DEFINES += -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 -DALLOW_LLVM_IR=1 \ 84 BASE_CXX_DEFINES += -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 -DALLOW_LLVM_IR=1 \
85 -DALLOW_LLVM_IR_AS_INPUT=1 -DALLOW_DISABLE_IR_GEN=1 \ 85 -DALLOW_LLVM_IR_AS_INPUT=1 -DALLOW_DISABLE_IR_GEN=1 \
86 -DALLOW_MINIMAL_BUILD=0 86 -DALLOW_MINIMAL_BUILD=0
87 endif 87 endif
88 88
89 ifdef TEXTUAL_BITCODE
90 BASE_CXX_DEFINES += -DINPUT_IS_TEXTUAL_BITCODE=1
91 OBJDIR := $(OBJDIR)+Tbc
92 TEXTBC_LIBS = -LLVMNaClBitTestUtils
jvoung (off chromium) 2015/06/23 22:17:35 Is this intended to be -LLVM... or should this be
Karl 2015/06/23 22:49:51 (1) I added it because it wasn't in LLVM_LIBS_LIST
jvoung (off chromium) 2015/06/24 01:30:59 But it is in LLVM_LIBS_LIST? Or am I reading this
Karl 2015/06/24 15:11:50 You are right. I didn't see it. I must be blind! I
93 else
94 BASE_CXX_DEFINES += -DINPUT_IS_TEXTUAL_BITCODE=0
95 TEXTBC_LIBS =
96 endif
97
89 SB_CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=1 98 SB_CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=1
90 CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=0 99 CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=0
91 100
92 ifdef NOASSERT 101 ifdef NOASSERT
93 ASSERTIONS = -DNDEBUG 102 ASSERTIONS = -DNDEBUG
94 else 103 else
95 ASSERTIONS = 104 ASSERTIONS =
96 OBJDIR := $(OBJDIR)+Asserts 105 OBJDIR := $(OBJDIR)+Asserts
97 endif 106 endif
98 107
(...skipping 24 matching lines...) Expand all
123 # and the unittests, since we build "tools-only" for the 132 # and the unittests, since we build "tools-only" for the
124 # sandboxed_translators (which doesn't include every library 133 # sandboxed_translators (which doesn't include every library
125 # listed by llvm-config). 134 # listed by llvm-config).
126 135
127 LLVM_LIBS_LIST := -lLLVMIRReader -lLLVMBitReader -lLLVMNaClBitTestUtils \ 136 LLVM_LIBS_LIST := -lLLVMIRReader -lLLVMBitReader -lLLVMNaClBitTestUtils \
128 -lLLVMNaClBitReader -lLLVMNaClBitAnalysis -lLLVMNaClBitWriter \ 137 -lLLVMNaClBitReader -lLLVMNaClBitAnalysis -lLLVMNaClBitWriter \
129 -lLLVMAsmParser -lLLVMNaClAnalysis -lLLVMCore -lLLVMSupport 138 -lLLVMAsmParser -lLLVMNaClAnalysis -lLLVMCore -lLLVMSupport
130 139
131 ifeq ($(AUTOCONF), 0) 140 ifeq ($(AUTOCONF), 0)
132 # LLVM cmake build 141 # LLVM cmake build
133 LLVM_LIBS := $(LLVM_LIBS_LIST) 142 LLVM_LIBS := $(LLVM_LIBS_LIST) $(TEXTBC_LIBS)
134 # For the cmake build, the gtest libs end up in the same place as the LLVM 143 # For the cmake build, the gtest libs end up in the same place as the LLVM
135 # libs, so no "-L..." arg is needed. 144 # libs, so no "-L..." arg is needed.
136 GTEST_LIB_PATH ?= 145 GTEST_LIB_PATH ?=
137 CLANG_FORMAT_PATH ?= $(PNACL_BIN_PATH) 146 CLANG_FORMAT_PATH ?= $(PNACL_BIN_PATH)
138 else 147 else
139 # LLVM autoconf build 148 # LLVM autoconf build
140 LLVM_LIBS := -lLLVM-3.7svn 149 LLVM_LIBS := -lLLVM-3.7svn
141 GTEST_LIB_PATH ?= -L../../out/llvm_x86_64_linux_work/Release+Asserts/lib 150 GTEST_LIB_PATH ?= -L../../out/llvm_x86_64_linux_work/Release+Asserts/lib
142 CLANG_FORMAT_PATH ?= ../../out/llvm_x86_64_linux_work/Release+Asserts/bin 151 CLANG_FORMAT_PATH ?= ../../out/llvm_x86_64_linux_work/Release+Asserts/bin
143 endif 152 endif
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 # Keep all the first target so it's the default. 227 # Keep all the first target so it's the default.
219 all: $(OBJDIR)/pnacl-sz make_symlink runtime 228 all: $(OBJDIR)/pnacl-sz make_symlink runtime
220 229
221 ifdef TSAN 230 ifdef TSAN
222 sb: 231 sb:
223 @echo "Skipping pnacl-sz.*.nexe: TSAN isn't supported under NaCl." 232 @echo "Skipping pnacl-sz.*.nexe: TSAN isn't supported under NaCl."
224 else 233 else
225 sb: $(SB_OBJDIR)/pnacl-sz.x86-32.nexe 234 sb: $(SB_OBJDIR)/pnacl-sz.x86-32.nexe
226 endif 235 endif
227 236
237 # SHOW_BUILD_ATTS is an executable that is run to show what build
238 # attributes were used to build pnacl-sz.
239 ifdef TEXTUAL_BITCODE
240 SHOW_BUILD_ATTS = echo "Can't show build attributes when TEXTUAL_BITCODE=1"
241 else
242 SHOW_BUILD_ATTS = $(OBJDIR)/pnacl-sz --build-atts
243 endif
244
228 # Creates symbolic link so that testing is easier. Also runs 245 # Creates symbolic link so that testing is easier. Also runs
229 # pnacl-sz to verify that the defines flags have valid values, 246 # pnacl-sz to verify that the defines flags have valid values,
230 # as well as describe the corresponding build attributes. 247 # as well as describe the corresponding build attributes.
231 make_symlink: $(OBJDIR)/pnacl-sz 248 make_symlink: $(OBJDIR)/pnacl-sz
232 rm -rf pnacl-sz 249 rm -rf pnacl-sz
233 ln -s $(OBJDIR)/pnacl-sz 250 ln -s $(OBJDIR)/pnacl-sz
234 @echo "Build Attributes:" 251 @echo "Build Attributes:"
235 » @$(OBJDIR)/pnacl-sz --build-atts 252 » @$(SHOW_BUILD_ATTS)
236 253
237 .PHONY: all make_symlink runtime bloat sb 254 .PHONY: all make_symlink runtime bloat sb
238 255
239 $(OBJDIR)/pnacl-sz: $(OBJS) 256 $(OBJDIR)/pnacl-sz: $(OBJS)
240 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ 257 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \
241 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) 258 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib)
242 259
243 $(SB_OBJDIR)/pnacl-sz.x86-32.nexe: $(SB_OBJS) 260 $(SB_OBJDIR)/pnacl-sz.x86-32.nexe: $(SB_OBJS)
244 $(eval PNACL_SZ_BASE := $(patsubst %.nexe, %, $@)) 261 $(eval PNACL_SZ_BASE := $(patsubst %.nexe, %, $@))
245 $(SB_CXX) $(SB_LDFLAGS) -o $(PNACL_SZ_BASE).nonfinal.pexe $^ \ 262 $(SB_CXX) $(SB_LDFLAGS) -o $(PNACL_SZ_BASE).nonfinal.pexe $^ \
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 bloat: make_symlink 353 bloat: make_symlink
337 nm -C -S -l pnacl-sz | \ 354 nm -C -S -l pnacl-sz | \
338 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json 355 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json
339 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html 356 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html
340 357
341 clean: 358 clean:
342 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json 359 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json
343 360
344 clean-all: clean 361 clean-all: clean
345 rm -rf build/ 362 rm -rf build/
OLDNEW
« no previous file with comments | « no previous file | src/IceCompileServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698