Title: [164350] trunk/Source/_javascript_Core
- Revision
- 164350
- Author
- [email protected]
- Date
- 2014-02-18 20:30:29 -0800 (Tue, 18 Feb 2014)
Log Message
Don't call LLVMInitializeNativeTarget() because it can be all messed up if you cross-compile LLVM
https://bugs.webkit.org/show_bug.cgi?id=129020
Reviewed by Dan Bernstein.
LLVMInitializeNativeTarget() is this super special inline function in llvm-c/Target.h that
depends on some #define's that come from some really weird magic in autoconf/configure.ac.
That magic fails miserably for cross-compiles. So, we need to manually initialize the things
that InitializeNativeTarget initializes.
* llvm/library/LLVMExports.cpp:
(initializeAndGetJSCLLVMAPI):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (164349 => 164350)
--- trunk/Source/_javascript_Core/ChangeLog 2014-02-19 04:12:49 UTC (rev 164349)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-02-19 04:30:29 UTC (rev 164350)
@@ -1,5 +1,20 @@
2014-02-18 Filip Pizlo <[email protected]>
+ Don't call LLVMInitializeNativeTarget() because it can be all messed up if you cross-compile LLVM
+ https://bugs.webkit.org/show_bug.cgi?id=129020
+
+ Reviewed by Dan Bernstein.
+
+ LLVMInitializeNativeTarget() is this super special inline function in llvm-c/Target.h that
+ depends on some #define's that come from some really weird magic in autoconf/configure.ac.
+ That magic fails miserably for cross-compiles. So, we need to manually initialize the things
+ that InitializeNativeTarget initializes.
+
+ * llvm/library/LLVMExports.cpp:
+ (initializeAndGetJSCLLVMAPI):
+
+2014-02-18 Filip Pizlo <[email protected]>
+
The shell scripts in the Xcode build system should tell you when they failed
https://bugs.webkit.org/show_bug.cgi?id=129018
Modified: trunk/Source/_javascript_Core/llvm/library/LLVMExports.cpp (164349 => 164350)
--- trunk/Source/_javascript_Core/llvm/library/LLVMExports.cpp 2014-02-19 04:12:49 UTC (rev 164349)
+++ trunk/Source/_javascript_Core/llvm/library/LLVMExports.cpp 2014-02-19 04:30:29 UTC (rev 164350)
@@ -47,11 +47,20 @@
callback("Could not start LLVM multithreading");
LLVMLinkInMCJIT();
- LLVMInitializeNativeTarget();
+
+ // You think you want to call LLVMInitializeNativeTarget()? Think again. This presumes that
+ // LLVM was ./configured correctly, which won't be the case in cross-compilation situations.
+
#if CPU(X86_64)
+ LLVMInitializeX86TargetInfo();
+ LLVMInitializeX86Target();
+ LLVMInitializeX86TargetMC();
LLVMInitializeX86AsmPrinter();
LLVMInitializeX86Disassembler();
#elif CPU(ARM64)
+ LLVMInitializeARM64TargetInfo();
+ LLVMInitializeARM64Target();
+ LLVMInitializeARM64TargetMC();
LLVMInitializeARM64AsmPrinter();
LLVMInitializeARM64Disassembler();
#else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes