Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 1 | |
Derek Schuff | bc64313 | 2014-05-22 16:39:25 -0700 | [diff] [blame] | 2 | ifndef SUBZERO_LEVEL |
| 3 | # Top-level, not included from a subdir |
| 4 | SUBZERO_LEVEL := . |
| 5 | DIRS := src |
| 6 | PARALLEL_DIRS := |
| 7 | endif |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 8 | |
Derek Schuff | bc64313 | 2014-05-22 16:39:25 -0700 | [diff] [blame] | 9 | # Set LLVM source root level. |
| 10 | LEVEL := $(SUBZERO_LEVEL)/../.. |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 11 | |
Derek Schuff | bc64313 | 2014-05-22 16:39:25 -0700 | [diff] [blame] | 12 | # Include LLVM common makefile. |
| 13 | include $(LEVEL)/Makefile.common |
Karl Schimpf | b262c5e | 2014-10-27 14:41:57 -0700 | [diff] [blame] | 14 | |
Jan Voung | e837e1a | 2015-03-02 14:21:54 -0800 | [diff] [blame] | 15 | # -O3 seems to trigger the following PNaCl ABI transform bug |
| 16 | # on method pointers, so override that with -O2: |
| 17 | # https://code.google.com/p/nativeclient/issues/detail?id=3857 |
| 18 | CXX.Flags += -O2 |
| 19 | # Newlib paired with libc++ requires gnu. |
| 20 | CXX.Flags += -std=gnu++11 |
Karl Schimpf | b262c5e | 2014-10-27 14:41:57 -0700 | [diff] [blame] | 21 | |
Jan Voung | e837e1a | 2015-03-02 14:21:54 -0800 | [diff] [blame] | 22 | ifeq ($(PNACL_BROWSER_TRANSLATOR),1) |
| 23 | CPP.Defines += -DALLOW_DUMP=0 -DALLOW_LLVM_CL=0 -DALLOW_LLVM_IR=0 \ |
Jim Stichnoth | 1670ece | 2016-03-12 10:04:08 -0800 | [diff] [blame] | 24 | -DALLOW_TIMERS=0 -DALLOW_LLVM_IR_AS_INPUT=0 -DALLOW_MINIMAL_BUILD=1 \ |
John Porto | 681f90f | 2016-04-05 06:20:50 -0700 | [diff] [blame] | 25 | -DALLOW_WASM=0 -DPNACL_BROWSER_TRANSLATOR=1 |
Jan Voung | e837e1a | 2015-03-02 14:21:54 -0800 | [diff] [blame] | 26 | else |
| 27 | CPP.Defines += -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 -DALLOW_LLVM_IR=1 \ |
Jim Stichnoth | 1670ece | 2016-03-12 10:04:08 -0800 | [diff] [blame] | 28 | -DALLOW_TIMERS=1 -DALLOW_LLVM_IR_AS_INPUT=1 -DALLOW_MINIMAL_BUILD=0 \ |
John Porto | 681f90f | 2016-04-05 06:20:50 -0700 | [diff] [blame] | 29 | -DALLOW_WASM=0 -DPNACL_BROWSER_TRANSLATOR=0 |
Jan Voung | e837e1a | 2015-03-02 14:21:54 -0800 | [diff] [blame] | 30 | endif |