forked from DeepRec-AI/DeepRec
-
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.
PR #18293: [XLA/AOT] Build LLVM with Bazel on Windows
I previously use hacky BUILD file to import prebuilt LLVM binaries from CMake to Bazel so that I can build `tfcompile` with Bazel on Windows, but since Tensorflow updates the LLVM revision used very frequently, this method is too troublesome. I am trying to make XLA/AOT to work out-of-the-box on Windows with Bazel, then convince Tensorflow team to create a presubmit so that no one can break XLA/AOT on Windows anymore. Summary: - Remove unused `llvm_host_triple`. - Rename `cmake_vars` to `posix_cmake_vars` and create a new `win32_cmake_vars` as Windows is sufficiently different from other platforms. - Create `LLVM_DEFINES`, `LLVM_COPTS` and `LLVM_LINKOPTS` in `llvm.bzl` to set global compile/link flags for LLVM. - Create macro `llvm_cc_library` that wrap around `cc_library` to ensure that all targets receive `LLVM_COPTS` consistently. Replace all `cc_library` with `llvm_cc_library`. - For `support` library, include `lib/Support/Windows/*` for Windows and `lib/Support/Unix/*` for others. If `llvm.BUILD` is not to be edited manually no matter what, can the script used to generate `llvm.BUILD` be open-sourced? #15213 /cc @tatatodd Imported from GitHub PR #18293 Copybara import of the project: - a5e7b841d79878b12e0d0103e5b1813384a80aa8 [XLA/AOT] Build LLVM with Bazel on Windows by Loo Rong Jie <loorongjie@gmail.com> - b3a20c7bbff95fd8ad9f44c653a3ecffc54de3b3 Add back LLVM_ENABLE_STATS by Loo Rong Jie <loorongjie@gmail.com> - 787d451b495180f5c882d09d76222c157102f0fc Merge b3a20c7bbff95fd8ad9f44c653a3ecffc54de3b3 into 6a1ff... by Loo Rong Jie <loorongjie@gmail.com> COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#18293 from rongjiecomputer:llvm b3a20c7bbff95fd8ad9f44c653a3ecffc54de3b3 PiperOrigin-RevId: 208073601
- Loading branch information
1 parent
1b5edbf
commit fe6b586
Showing
1 changed file
with
141 additions
and
28 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