OLD | NEW |
---|---|
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 Loading... | |
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 | 148 export ASAN_SYMBOLIZER_PATH=$(dir $(asan))llvm-symbolizer |
Jakob Kummerow
2015/01/07 13:02:05
This ain't gonna work no more. If you can't fix it
| |
155 TESTFLAGS += --asan | 149 TESTFLAGS += --asan |
156 ifeq ($(lsan), on) | 150 ifeq ($(lsan), on) |
157 GYPFLAGS += -Dlsan=1 | 151 GYPFLAGS += -Dlsan=1 |
158 endif | 152 endif |
159 endif | 153 endif |
160 | 154 |
161 # arm specific flags. | 155 # arm specific flags. |
162 # arm_version=<number | "default"> | 156 # arm_version=<number | "default"> |
163 ifneq ($(strip $(arm_version)),) | 157 ifneq ($(strip $(arm_version)),) |
164 GYPFLAGS += -Darm_version=$(arm_version) | 158 GYPFLAGS += -Darm_version=$(arm_version) |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 | 278 |
285 # Compile targets. MODES and ARCHES are convenience targets. | 279 # Compile targets. MODES and ARCHES are convenience targets. |
286 .SECONDEXPANSION: | 280 .SECONDEXPANSION: |
287 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) | 281 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) |
288 | 282 |
289 $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) | 283 $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) |
290 | 284 |
291 # Defines how to build a particular target (e.g. ia32.release). | 285 # Defines how to build a particular target (e.g. ia32.release). |
292 $(BUILDS): $(OUTDIR)/Makefile.$$@ | 286 $(BUILDS): $(OUTDIR)/Makefile.$$@ |
293 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ | 287 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ |
294 CXX="$(CXX)" LINK="$(LINK)" \ | |
295 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ | 288 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ |
296 python -c "print \ | 289 python -c "print \ |
297 raw_input().replace('opt', '').capitalize()") \ | 290 raw_input().replace('opt', '').capitalize()") \ |
298 builddir="$(shell pwd)/$(OUTDIR)/$@" | 291 builddir="$(shell pwd)/$(OUTDIR)/$@" |
299 | 292 |
300 native: $(OUTDIR)/Makefile.native | 293 native: $(OUTDIR)/Makefile.native |
301 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ | 294 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ |
302 » CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \ | 295 » BUILDTYPE=Release \ |
303 builddir="$(shell pwd)/$(OUTDIR)/$@" | 296 builddir="$(shell pwd)/$(OUTDIR)/$@" |
304 | 297 |
305 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) | 298 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) |
306 | 299 |
307 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ | 300 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ |
308 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android | 301 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android |
309 @$(MAKE) -f Makefile.android $@ \ | 302 @$(MAKE) -f Makefile.android $@ \ |
310 ARCH="$(basename $@)" \ | 303 ARCH="$(basename $@)" \ |
311 MODE="$(subst .,,$(suffix $@))" \ | 304 MODE="$(subst .,,$(suffix $@))" \ |
312 OUTDIR="$(OUTDIR)" \ | 305 OUTDIR="$(OUTDIR)" \ |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
461 | 454 |
462 # Replaces the old with the new environment file if they're different, which | 455 # Replaces the old with the new environment file if they're different, which |
463 # will trigger GYP to regenerate Makefiles. | 456 # will trigger GYP to regenerate Makefiles. |
464 $(ENVFILE): $(ENVFILE).new | 457 $(ENVFILE): $(ENVFILE).new |
465 @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) > /dev/null; \ | 458 @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) > /dev/null; \ |
466 then rm $(ENVFILE).new; \ | 459 then rm $(ENVFILE).new; \ |
467 else mv $(ENVFILE).new $(ENVFILE); fi | 460 else mv $(ENVFILE).new $(ENVFILE); fi |
468 | 461 |
469 # Stores current GYPFLAGS in a file. | 462 # Stores current GYPFLAGS in a file. |
470 $(ENVFILE).new: | 463 $(ENVFILE).new: |
471 » @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new; \ | 464 » $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \ |
472 » echo "CXX=$(CXX)" >> $(ENVFILE).new | 465 » cut -f 2 -d " " | cut -f 1 -d "-" )) |
466 » $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) | |
467 » @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS) -Dtarget_arch=$(CXX_TARG ET_ARCH)" > $(ENVFILE).new; | |
473 | 468 |
474 # Heap constants for grokdump. | 469 # Heap constants for grokdump. |
475 DUMP_FILE = tools/v8heapconst.py | 470 DUMP_FILE = tools/v8heapconst.py |
476 grokdump: ia32.release | 471 grokdump: ia32.release |
477 @cat $(DUMP_FILE).tmpl > $(DUMP_FILE) | 472 @cat $(DUMP_FILE).tmpl > $(DUMP_FILE) |
478 @$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE) | 473 @$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE) |
479 | 474 |
480 # Support for the GNU GLOBAL Source Code Tag System. | 475 # Support for the GNU GLOBAL Source Code Tag System. |
481 gtags.files: $(GYPFILES) $(ENVFILE) | 476 gtags.files: $(GYPFILES) $(ENVFILE) |
482 @find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@ | 477 @find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@ |
(...skipping 22 matching lines...) Expand all Loading... | |
505 third_party/icu --revision 277999 ; \ | 500 third_party/icu --revision 277999 ; \ |
506 fi | 501 fi |
507 svn checkout --force https://googletest.googlecode.com/svn/trunk \ | 502 svn checkout --force https://googletest.googlecode.com/svn/trunk \ |
508 testing/gtest --revision 692 | 503 testing/gtest --revision 692 |
509 svn checkout --force https://googlemock.googlecode.com/svn/trunk \ | 504 svn checkout --force https://googlemock.googlecode.com/svn/trunk \ |
510 testing/gmock --revision 485 | 505 testing/gmock --revision 485 |
511 | 506 |
512 dependencies: builddeps | 507 dependencies: builddeps |
513 # The spec is a copy of the hooks in v8's DEPS file. | 508 # 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''} ]" | 509 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''} ]" |
OLD | NEW |