forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Place a fork of LLVM git rev c179d7b006348005d2da228aed4c3c251590baa3 under `external/llvh`(1) and modify the CMake build to use it. I am calling it a "fork", because it is not all of LLVM. Only the parts that are used by Hermes are included, which at this time is only parts of `libLLVMSupporrt`. Most(2) of LLVM build scripts are removed, and it is treated just as another ordinary library. (1) Why `llvh`? To be able to coexist with instances of the "real" LLVM, we must change the namespace, all public symbols containing the `llvm` string and the include directory name. `llvh` seemed as good a name as any. I also considered `llvm-h` and `h-llvm`, but the problem is that they are a superstring of `llvm` so it becomes harder to search for the `llvm` string. Note that the actual rename will happen in a follow up diff. It would be a massive patch. (2) libLLVMSupport relies on pretty elaborate feature detection scripts, which would be painful to duplicate, so for now I have preserved them under external/llvh/cmake. Unfortunately turning LLVM into an ordinary library is not enough, since we were implicitly relying on a lot of functionality provided by the LLVM build scripts. Things like setting default warning flags, easily turning exceptions on and off, etc. I attempted to replace it with Hermes equivalents, which are now provided by `cmake/Hermes.cmake`: - `add_llvm_library/tool()` is replaced by `add_hermes_library/tool()`. - Several `LLVM_xxx` variables are replaced my similar `HERMES_xxx` ones. As a result, building Hermes now requires only checking it out, and running CMake and Ninja. It is a vastly simpler process than before. == Limitations - CMake LTO and ASAN builds aren't supported yet. - The JIT requires the "real" LLVM for disassembly. Reviewed By: avp Differential Revision: D19658656 fbshipit-source-id: 5094d2af45e343973b1aab02c550a18b2bf93a06
- Loading branch information
1 parent
b187729
commit 611cac5
Showing
83 changed files
with
3,785 additions
and
691 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
|
||
# Dummy CMakeLists to avoid a test failure | ||
|
||
add_llvm_library(synth_test | ||
add_hermes_library(synth_test | ||
Driver.cpp | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.