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

Side by Side Diff: Makefile

Issue 807143003: Remove the magic that sets CXX in the toplevel Makefile (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
11 # with the distribution. 11 # with the distribution.
12 # * Neither the name of Google Inc. nor the names of its 12 # * Neither the name of Google Inc. nor the names of its
13 # contributors may be used to endorse or promote products derived 13 # contributors may be used to endorse or promote products derived
14 # from this software without specific prior written permission. 14 # from this software without specific prior written permission.
15 # 15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 28
29 # Variable default definitions. Override them by exporting them in your shell. 29 # Variable default definitions. Override them by exporting them in your shell.
30 CXX ?= g++
31 LINK ?= g++
32 OUTDIR ?= out 30 OUTDIR ?= out
33 TESTJOBS ?= 31 TESTJOBS ?=
34 GYPFLAGS ?= 32 GYPFLAGS ?=
35 TESTFLAGS ?= 33 TESTFLAGS ?=
36 ANDROID_NDK_ROOT ?= 34 ANDROID_NDK_ROOT ?=
37 ANDROID_NDK_HOST_ARCH ?= 35 ANDROID_NDK_HOST_ARCH ?=
38 ANDROID_TOOLCHAIN ?= 36 ANDROID_TOOLCHAIN ?=
39 ANDROID_V8 ?= /data/local/tmp/v8 37 ANDROID_V8 ?= /data/local/tmp/v8
40 NACL_SDK_ROOT ?= 38 NACL_SDK_ROOT ?=
41 39
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 endif 135 endif
138 # i18nsupport=off 136 # i18nsupport=off
139 ifeq ($(i18nsupport), off) 137 ifeq ($(i18nsupport), off)
140 GYPFLAGS += -Dv8_enable_i18n_support=0 138 GYPFLAGS += -Dv8_enable_i18n_support=0
141 TESTFLAGS += --noi18n 139 TESTFLAGS += --noi18n
142 endif 140 endif
143 # deprecation_warnings=on 141 # deprecation_warnings=on
144 ifeq ($(deprecationwarnings), on) 142 ifeq ($(deprecationwarnings), on)
145 GYPFLAGS += -Dv8_deprecation_warnings=1 143 GYPFLAGS += -Dv8_deprecation_warnings=1
146 endif 144 endif
147 # asan=/path/to/clang++ 145 # asan=on
148 ifneq ($(strip $(asan)),) 146 ifeq ($(asan), on)
149 GYPFLAGS += -Dasan=1 147 GYPFLAGS += -Dasan=1 -Dclang=1
150 export CC=$(dir $(asan))clang
151 export CXX=$(asan)
152 export CXX_host=$(asan)
153 export LINK=$(asan)
154 export ASAN_SYMBOLIZER_PATH=$(dir $(asan))llvm-symbolizer
155 TESTFLAGS += --asan 148 TESTFLAGS += --asan
156 ifeq ($(lsan), on) 149 ifeq ($(lsan), on)
157 GYPFLAGS += -Dlsan=1 150 GYPFLAGS += -Dlsan=1
158 endif 151 endif
159 endif 152 endif
160 153
161 # arm specific flags. 154 # arm specific flags.
162 # arm_version=<number | "default"> 155 # arm_version=<number | "default">
163 ifneq ($(strip $(arm_version)),) 156 ifneq ($(strip $(arm_version)),)
164 GYPFLAGS += -Darm_version=$(arm_version) 157 GYPFLAGS += -Darm_version=$(arm_version)
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 277
285 # Compile targets. MODES and ARCHES are convenience targets. 278 # Compile targets. MODES and ARCHES are convenience targets.
286 .SECONDEXPANSION: 279 .SECONDEXPANSION:
287 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) 280 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
288 281
289 $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) 282 $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES))
290 283
291 # Defines how to build a particular target (e.g. ia32.release). 284 # Defines how to build a particular target (e.g. ia32.release).
292 $(BUILDS): $(OUTDIR)/Makefile.$$@ 285 $(BUILDS): $(OUTDIR)/Makefile.$$@
293 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ 286 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
294 CXX="$(CXX)" LINK="$(LINK)" \
295 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ 287 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
296 python -c "print \ 288 python -c "print \
297 raw_input().replace('opt', '').capitalize()") \ 289 raw_input().replace('opt', '').capitalize()") \
298 builddir="$(shell pwd)/$(OUTDIR)/$@" 290 builddir="$(shell pwd)/$(OUTDIR)/$@"
299 291
300 native: $(OUTDIR)/Makefile.native 292 native: $(OUTDIR)/Makefile.native
301 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ 293 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \
302 » CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \ 294 » BUILDTYPE=Release \
303 builddir="$(shell pwd)/$(OUTDIR)/$@" 295 builddir="$(shell pwd)/$(OUTDIR)/$@"
304 296
305 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) 297 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
306 298
307 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ 299 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
308 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android 300 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android
309 @$(MAKE) -f Makefile.android $@ \ 301 @$(MAKE) -f Makefile.android $@ \
310 ARCH="$(basename $@)" \ 302 ARCH="$(basename $@)" \
311 MODE="$(subst .,,$(suffix $@))" \ 303 MODE="$(subst .,,$(suffix $@))" \
312 OUTDIR="$(OUTDIR)" \ 304 OUTDIR="$(OUTDIR)" \
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 453
462 # Replaces the old with the new environment file if they're different, which 454 # Replaces the old with the new environment file if they're different, which
463 # will trigger GYP to regenerate Makefiles. 455 # will trigger GYP to regenerate Makefiles.
464 $(ENVFILE): $(ENVFILE).new 456 $(ENVFILE): $(ENVFILE).new
465 @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) > /dev/null; \ 457 @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) > /dev/null; \
466 then rm $(ENVFILE).new; \ 458 then rm $(ENVFILE).new; \
467 else mv $(ENVFILE).new $(ENVFILE); fi 459 else mv $(ENVFILE).new $(ENVFILE); fi
468 460
469 # Stores current GYPFLAGS in a file. 461 # Stores current GYPFLAGS in a file.
470 $(ENVFILE).new: 462 $(ENVFILE).new:
471 » @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new; \ 463 » $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \
472 » echo "CXX=$(CXX)" >> $(ENVFILE).new 464 » cut -f 2 -d " " | cut -f 1 -d "-" ))
465 » $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH)))
466 » @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS) -Dtarget_arch=$(CXX_TARG ET_ARCH)" > $(ENVFILE).new;
473 467
474 # Heap constants for grokdump. 468 # Heap constants for grokdump.
475 DUMP_FILE = tools/v8heapconst.py 469 DUMP_FILE = tools/v8heapconst.py
476 grokdump: ia32.release 470 grokdump: ia32.release
477 @cat $(DUMP_FILE).tmpl > $(DUMP_FILE) 471 @cat $(DUMP_FILE).tmpl > $(DUMP_FILE)
478 @$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE) 472 @$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE)
479 473
480 # Support for the GNU GLOBAL Source Code Tag System. 474 # Support for the GNU GLOBAL Source Code Tag System.
481 gtags.files: $(GYPFILES) $(ENVFILE) 475 gtags.files: $(GYPFILES) $(ENVFILE)
482 @find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@ 476 @find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@
(...skipping 22 matching lines...) Expand all
505 third_party/icu --revision 277999 ; \ 499 third_party/icu --revision 277999 ; \
506 fi 500 fi
507 svn checkout --force https://googletest.googlecode.com/svn/trunk \ 501 svn checkout --force https://googletest.googlecode.com/svn/trunk \
508 testing/gtest --revision 692 502 testing/gtest --revision 692
509 svn checkout --force https://googlemock.googlecode.com/svn/trunk \ 503 svn checkout --force https://googlemock.googlecode.com/svn/trunk \
510 testing/gmock --revision 485 504 testing/gmock --revision 485
511 505
512 dependencies: builddeps 506 dependencies: builddeps
513 # The spec is a copy of the hooks in v8's DEPS file. 507 # The spec is a copy of the hooks in v8's DEPS file.
514 gclient sync -r fb782d4369d5ae04f17a2fceef7de5a63e50f07b --spec="solutio ns = [{u'managed': False, u'name': u'buildtools', u'url': u'https://chromium.goo glesource.com/chromium/buildtools.git', u'custom_deps': {}, u'custom_hooks': [{u 'name': u'clang_format_win',u'pattern': u'.',u'action': [u'download_from_google_ storage',u'--no_resume',u'--platform=win32',u'--no_auth',u'--bucket',u'chromium- clang-format',u'-s',u'buildtools/win/clang-format.exe.sha1']},{u'name': u'clang_ format_mac',u'pattern': u'.',u'action': [u'download_from_google_storage',u'--no_ resume',u'--platform=darwin',u'--no_auth',u'--bucket',u'chromium-clang-format',u '-s',u'buildtools/mac/clang-format.sha1']},{u'name': u'clang_format_linux',u'pat tern': u'.',u'action': [u'download_from_google_storage',u'--no_resume',u'--platf orm=linux*',u'--no_auth',u'--bucket',u'chromium-clang-format',u'-s',u'buildtools /linux64/clang-format.sha1']}],u'deps_file': u'.DEPS.git', u'safesync_url': u''} ]" 508 gclient sync -r fb782d4369d5ae04f17a2fceef7de5a63e50f07b --spec="solutio ns = [{u'managed': False, u'name': u'buildtools', u'url': u'https://chromium.goo glesource.com/chromium/buildtools.git', u'custom_deps': {}, u'custom_hooks': [{u 'name': u'clang_format_win',u'pattern': u'.',u'action': [u'download_from_google_ storage',u'--no_resume',u'--platform=win32',u'--no_auth',u'--bucket',u'chromium- clang-format',u'-s',u'buildtools/win/clang-format.exe.sha1']},{u'name': u'clang_ format_mac',u'pattern': u'.',u'action': [u'download_from_google_storage',u'--no_ resume',u'--platform=darwin',u'--no_auth',u'--bucket',u'chromium-clang-format',u '-s',u'buildtools/mac/clang-format.sha1']},{u'name': u'clang_format_linux',u'pat tern': u'.',u'action': [u'download_from_google_storage',u'--no_resume',u'--platf orm=linux*',u'--no_auth',u'--bucket',u'chromium-clang-format',u'-s',u'buildtools /linux64/clang-format.sha1']}],u'deps_file': u'.DEPS.git', u'safesync_url': u''} ]"
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698