Go to the documentation of this file.
5 #ifndef V8_BASE_BUILD_CONFIG_H_
6 #define V8_BASE_BUILD_CONFIG_H_
14 #if defined(_M_X64) || defined(__x86_64__)
15 #if defined(__native_client__)
22 #define V8_HOST_ARCH_IA32 1
23 #define V8_HOST_ARCH_32_BIT 1
25 #define V8_HOST_ARCH_X64 1
26 #if defined(__x86_64__) && __SIZEOF_POINTER__ == 4
27 #define V8_HOST_ARCH_32_BIT 1
29 #define V8_HOST_ARCH_64_BIT 1
32 #elif defined(_M_IX86) || defined(__i386__)
33 #define V8_HOST_ARCH_IA32 1
34 #define V8_HOST_ARCH_32_BIT 1
35 #elif defined(__AARCH64EL__)
36 #define V8_HOST_ARCH_ARM64 1
37 #define V8_HOST_ARCH_64_BIT 1
38 #elif defined(__ARMEL__)
39 #define V8_HOST_ARCH_ARM 1
40 #define V8_HOST_ARCH_32_BIT 1
41 #elif defined(__mips64)
42 #define V8_HOST_ARCH_MIPS64 1
43 #define V8_HOST_ARCH_64_BIT 1
44 #elif defined(__MIPSEB__) || defined(__MIPSEL__)
45 #define V8_HOST_ARCH_MIPS 1
46 #define V8_HOST_ARCH_32_BIT 1
48 #error "Host architecture was not detected as supported by v8"
51 #if defined(__ARM_ARCH_7A__) || \
52 defined(__ARM_ARCH_7R__) || \
53 defined(__ARM_ARCH_7__)
54 # define CAN_USE_ARMV7_INSTRUCTIONS 1
55 # ifndef CAN_USE_VFP3_INSTRUCTIONS
56 # define CAN_USE_VFP3_INSTRUCTIONS
64 #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_X87 && \
65 !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && \
66 !V8_TARGET_ARCH_MIPS64
67 #if defined(_M_X64) || defined(__x86_64__)
68 #define V8_TARGET_ARCH_X64 1
69 #elif defined(_M_IX86) || defined(__i386__)
70 #define V8_TARGET_ARCH_IA32 1
71 #elif defined(__AARCH64EL__)
72 #define V8_TARGET_ARCH_ARM64 1
73 #elif defined(__ARMEL__)
74 #define V8_TARGET_ARCH_ARM 1
75 #elif defined(__mips64)
76 #define V8_TARGET_ARCH_MIPS64 1
77 #elif defined(__MIPSEB__) || defined(__MIPSEL__)
78 #define V8_TARGET_ARCH_MIPS 1
80 #error Target architecture was not detected as supported by v8
85 #if V8_TARGET_ARCH_IA32
86 #define V8_TARGET_ARCH_32_BIT 1
87 #elif V8_TARGET_ARCH_X64
88 #if !V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_64_BIT
89 #if defined(__x86_64__) && __SIZEOF_POINTER__ == 4
90 #define V8_TARGET_ARCH_32_BIT 1
92 #define V8_TARGET_ARCH_64_BIT 1
95 #elif V8_TARGET_ARCH_ARM
96 #define V8_TARGET_ARCH_32_BIT 1
97 #elif V8_TARGET_ARCH_ARM64
98 #define V8_TARGET_ARCH_64_BIT 1
99 #elif V8_TARGET_ARCH_MIPS
100 #define V8_TARGET_ARCH_32_BIT 1
101 #elif V8_TARGET_ARCH_MIPS64
102 #define V8_TARGET_ARCH_64_BIT 1
103 #elif V8_TARGET_ARCH_X87
104 #define V8_TARGET_ARCH_32_BIT 1
106 #error Unknown target architecture pointer size
110 #if V8_TARGET_ARCH_IA32 && !V8_HOST_ARCH_IA32
111 #error Target architecture ia32 is only supported on ia32 host
113 #if (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_64_BIT && \
114 !(V8_HOST_ARCH_X64 && V8_HOST_ARCH_64_BIT))
115 #error Target architecture x64 is only supported on x64 host
117 #if (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT && \
118 !(V8_HOST_ARCH_X64 && V8_HOST_ARCH_32_BIT))
119 #error Target architecture x32 is only supported on x64 host with x32 support
121 #if (V8_TARGET_ARCH_ARM && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_ARM))
122 #error Target architecture arm is only supported on arm and ia32 host
124 #if (V8_TARGET_ARCH_ARM64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_ARM64))
125 #error Target architecture arm64 is only supported on arm64 and x64 host
127 #if (V8_TARGET_ARCH_MIPS && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_MIPS))
128 #error Target architecture mips is only supported on mips and ia32 host
130 #if (V8_TARGET_ARCH_MIPS64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_MIPS64))
131 #error Target architecture mips64 is only supported on mips64 and x64 host
135 #if V8_TARGET_ARCH_IA32
136 #define V8_TARGET_LITTLE_ENDIAN 1
137 #elif V8_TARGET_ARCH_X64
138 #define V8_TARGET_LITTLE_ENDIAN 1
139 #elif V8_TARGET_ARCH_ARM
140 #define V8_TARGET_LITTLE_ENDIAN 1
141 #elif V8_TARGET_ARCH_ARM64
142 #define V8_TARGET_LITTLE_ENDIAN 1
143 #elif V8_TARGET_ARCH_MIPS
144 #if defined(__MIPSEB__)
145 #define V8_TARGET_BIG_ENDIAN 1
147 #define V8_TARGET_LITTLE_ENDIAN 1
149 #elif V8_TARGET_ARCH_MIPS64
150 #define V8_TARGET_LITTLE_ENDIAN 1
151 #elif V8_TARGET_ARCH_X87
152 #define V8_TARGET_LITTLE_ENDIAN 1
154 #error Unknown target architecture endianness