Whitespace changes
[MPC.git] / config / pin_base.mpb
blob7cf8eda9b3a3a2bf25161bbb4be855e7a1d8421c
1 project {
2   requires += pin
4   includes += $(PIN_ROOT)/source/include \
5               $(PIN_ROOT)/source/include/pin \
6               $(PIN_ROOT)/source/include/pin/gen \
7                   $(PIN_ROOT)/extras/cxx/include \
8                   $(PIN_ROOT)/extras/libstdc++/include \
9                   $(PIN_ROOT)/extras/crt/include \
10                   $(PIN_ROOT)/extras/crt/include/kernel/uapi \
11                   $(PIN_ROOT)/extras/crt/include/kernel/uapi/asm-x86 \
12                   $(PIN_ROOT)/libunwind/include \
13               $(PIN_ROOT)/extras/components/include \
14                   $(PIN_ROOT)/extras/crt/include
16   macros += BIGARRAY_MULTIPLIER=1 USING_XED PIN_CRT=1 __PIN__=1
18   specific (vc9) {
19     runtime_library = 0
20     compile_flags += /Oy
21   }
23   specific (prop:microsoft) {
24     runtime_library = MultiThreaded
25     ImageHasSafeExceptionHandlers = false
27     macros += _ITERATOR_DEBUG_LEVEL=0
28   }
30   specific (prop:windows) {
31     macros += TARGET_WINDOWS _SECURE_SCL=0
32     configurations -= Debug
34     DisableSpecificWarning += 4530
35     IgnoreAllDefaultLibraries = true
37     // We need to remove the _DEBUG macro so that Visual Studio does not
38     // try to link against the debug C++ libraries. Otherwise, the program
39     // will not compile, and will have link errors.
40     Debug::macros -= _DEBUG
41   }
43   specific (gnuace, make) {
44     compile_flags += -O3 -funwind-tables -fno-stack-protector -fasynchronous-unwind-tables -fomit-frame-pointer -fno-strict-aliasing -fno-rtti -fPIC -nostdlib -fpermissive -Wno-error=all -fno-exceptions
45     compile_flags -= -Wunused-parameter -nostdlib
47     libs += xed
48     libs += c-dynamic m-dynamic c++ c++abi unwind-dynamic
49   }
51   verbatim (make, macros) {
52     ifeq ($(shell uname -s), Darwin)
53       CPPFLAGS += -DTARGET_MAC -D__DARWIN_ONLY_UNIX_CONFORMANCE=1 -D__DARWIN_UNIX03=0
54       LDFLAGS  += -Wl,-no_new_main
55     else
56       CPPFLAGS += -DTARGET_LINUX -faligned-new
57       LDFLAGS  += -ldl-dynamic
58     endif
60     // We have to disable hidden symbols since we are not manually exporting
61     // the main() function.
62     no_hidden_visibility = 1
63   }
65   verbatim (gnuace, macros) {
66     ifeq ($(shell uname -s), Darwin)
67       CPPFLAGS += -DTARGET_MAC -D__DARWIN_ONLY_UNIX_CONFORMANCE=1 -D__DARWIN_UNIX03=0
68     else
69       CPPFLAGS += -DTARGET_LINUX -Wl,--hash-style=sysv -faligned-new
70     endif
71   }
74 feature(ia32) {
75   includes += $(PIN_ROOT)/extras/xed-ia32/include \
76               $(PIN_ROOT)/extras/crt/include/arch-x86
78   libpaths += $(PIN_ROOT)/ia32/lib \
79               $(PIN_ROOT)/ia32/lib-ext \
80               $(PIN_ROOT)/extras/xed-ia32/lib \
81               $(PIN_ROOT)/extras/components/lib/ia32
83   macros += TARGET_IA32 HOST_IA32
84   avoids += intel64
86   specific (prop:windows) {
87     libpaths += $(PIN_ROOT)/ia32/lib \
88                 $(PIN_ROOT)/ia32/lib-ext
90     // DO NOT CHANGE ORDER
91     lit_libs += libcpmt libcmt pinvm pin libxed ntdll-32
92   }
94   specific (make, gnuace) {
95     compile_flags += -m32
96   }
99 feature(intel64) {
100   includes += $(PIN_ROOT)/extras/xed-intel64/include \
101               $(PIN_ROOT)/extras/xed-intel64/include/xed \
102                   $(PIN_ROOT)/extras/crt/include/arch-x86_64
104   libpaths += $(PIN_ROOT)/intel64/lib \
105               $(PIN_ROOT)/intel64/lib-ext \
106               $(PIN_ROOT)/extras/xed-intel64/lib \
107               $(PIN_ROOT)/extras/components/lib/intel64 \
108               $(PIN_ROOT)/intel64/runtime/pincrt
110   macros += TARGET_IA32E HOST_IA32E
111   avoids += ia32
113   specific (prop:windows) {
114     // DO NOT CHANGE ORDER
115     lit_libs += libcpmt libcmt pinvm pin libxed ntdll-64
116   }
118   specific (make, gnuace) {
119     compile_flags += -isystem $(PIN_ROOT)/extras/crt/include/arch-x86_64 -isystem $(PIN_ROOT)/extras/crt/include/kernel/asm-x86_64
120   }