OLD | NEW |
1 #===-- Makefile.rules - Common make rules for LLVM ---------*- Makefile -*--===# | 1 #===-- Makefile.rules - Common make rules for LLVM ---------*- Makefile -*--===# |
2 # | 2 # |
3 # The LLVM Compiler Infrastructure | 3 # The LLVM Compiler Infrastructure |
4 # | 4 # |
5 # This file is distributed under the University of Illinois Open Source | 5 # This file is distributed under the University of Illinois Open Source |
6 # License. See LICENSE.TXT for details. | 6 # License. See LICENSE.TXT for details. |
7 # | 7 # |
8 #===------------------------------------------------------------------------===# | 8 #===------------------------------------------------------------------------===# |
9 # | 9 # |
10 # This file is included by all of the LLVM makefiles. For details on how to use | 10 # This file is included by all of the LLVM makefiles. For details on how to use |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 endif | 315 endif |
316 | 316 |
317 ifeq ($(ENABLE_LIBCPP),1) | 317 ifeq ($(ENABLE_LIBCPP),1) |
318 CXX.Flags += -stdlib=libc++ | 318 CXX.Flags += -stdlib=libc++ |
319 LD.Flags += -stdlib=libc++ | 319 LD.Flags += -stdlib=libc++ |
320 endif | 320 endif |
321 | 321 |
322 ifeq ($(ENABLE_CXX1Y),1) | 322 ifeq ($(ENABLE_CXX1Y),1) |
323 CXX.Flags += -std=c++1y | 323 CXX.Flags += -std=c++1y |
324 else | 324 else |
325 ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) | 325 ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW NativeClient)) |
326 # MinGW and Cygwin are a bit stricter and lack things like | 326 # MinGW, Cygwin, and NativeClient+newlib are a bit stricter and |
327 # 'strdup', 'stricmp', etc in c++11 mode. | 327 # lack things like 'strdup', 'stricmp', etc in c++11 mode. |
328 CXX.Flags += -std=gnu++11 | 328 CXX.Flags += -std=gnu++11 |
329 else | 329 else |
330 CXX.Flags += -std=c++11 | 330 CXX.Flags += -std=c++11 |
331 endif | 331 endif |
332 endif | 332 endif |
333 | 333 |
334 ifeq ($(ENABLE_WERROR),1) | 334 ifeq ($(ENABLE_WERROR),1) |
335 CXX.Flags += -Werror | 335 CXX.Flags += -Werror |
336 C.Flags += -Werror | 336 C.Flags += -Werror |
337 endif | 337 endif |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 ifneq ($(DARWIN_MAJVERS),4) | 657 ifneq ($(DARWIN_MAJVERS),4) |
658 LD.Flags += $(RPATH) -Wl,@executable_path/../lib | 658 LD.Flags += $(RPATH) -Wl,@executable_path/../lib |
659 endif | 659 endif |
660 ifeq ($(RC_XBS),YES) | 660 ifeq ($(RC_XBS),YES) |
661 TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/ll
vm-lto.XXXXXX) | 661 TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/ll
vm-lto.XXXXXX) |
662 LD.Flags += -Wl,-object_path_lto -Wl,$(TempFile) | 662 LD.Flags += -Wl,-object_path_lto -Wl,$(TempFile) |
663 endif | 663 endif |
664 endif | 664 endif |
665 endif | 665 endif |
666 | 666 |
| 667 #@LOCALMOD-BEGIN |
| 668 ifeq ($(PNACL_BROWSER_TRANSLATOR),1) |
| 669 CPP.Flags += -DPNACL_BROWSER_TRANSLATOR |
| 670 # NOTE: we specify --noirt to tell the driver that we should link |
| 671 # against private (non-stable, non-IRT) libraries for the |
| 672 # sandboxed translator. This could have been specified directly, |
| 673 # except that LLVM slips in -lpthread elsewhere in the build system, |
| 674 # and we need it to use -lpthread_private instead. |
| 675 LIBS += -Wl,--noirt -lsrpc -limc_syscalls -lplatform -lgio -lpthread |
| 676 ifeq ($(USE_TCMALLOC),1) |
| 677 # Note: -ltcmalloc_minimal needs to stay last on the link line |
| 678 LIBS += -ltcmalloc_minimal |
| 679 CXX.Flags += -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -f
no-builtin-free |
| 680 C.Flags += -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno
-builtin-free |
| 681 endif |
| 682 endif |
| 683 # @LOCALMOD-END |
667 | 684 |
668 #---------------------------------------------------------- | 685 #---------------------------------------------------------- |
669 # Options To Invoke Tools | 686 # Options To Invoke Tools |
670 #---------------------------------------------------------- | 687 #---------------------------------------------------------- |
671 | 688 |
672 ifdef EXTRA_LD_OPTIONS | 689 ifdef EXTRA_LD_OPTIONS |
673 LD.Flags += $(EXTRA_LD_OPTIONS) | 690 LD.Flags += $(EXTRA_LD_OPTIONS) |
674 endif | 691 endif |
675 | 692 |
676 ifndef NO_PEDANTIC | 693 ifndef NO_PEDANTIC |
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2155 $(Echo) "ProjLibsPaths: " '$(ProjLibsPaths)' | 2172 $(Echo) "ProjLibsPaths: " '$(ProjLibsPaths)' |
2156 $(Echo) "ProjLibsOptions: " '$(ProjLibsOptions)' | 2173 $(Echo) "ProjLibsOptions: " '$(ProjLibsOptions)' |
2157 | 2174 |
2158 ### | 2175 ### |
2159 # Debugging | 2176 # Debugging |
2160 | 2177 |
2161 # General debugging rule, use 'make dbg-print-XXX' to print the | 2178 # General debugging rule, use 'make dbg-print-XXX' to print the |
2162 # definition, value and origin of XXX. | 2179 # definition, value and origin of XXX. |
2163 make-print-%: | 2180 make-print-%: |
2164 $(error PRINT: $(value $*) = "$($*)" (from $(origin $*))) | 2181 $(error PRINT: $(value $*) = "$($*)" (from $(origin $*))) |
OLD | NEW |