Skip to content

Commit cd8c794

Browse files
committed
fix
1 parent 940e41e commit cd8c794

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

scripts/llvm_wasm/llvm_wasm_cache.cmake

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,27 @@
77

88
set(LLVM_ENABLE_PROJECTS "mlir;llvm;lld" CACHE STRING "")
99

10+
set(LLVM_ENABLE_DUMP ON CACHE BOOL "")
11+
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
1012
set(LLVM_TARGETS_TO_BUILD "WebAssembly" CACHE STRING "")
1113
set(LLVM_TARGET_ARCH "wasm32" CACHE STRING "")
1214
set(LLVM_DEFAULT_TARGET_TRIPLE "wasm32-unknown-emscripten" CACHE STRING "")
1315
set(LLVM_HOST_TRIPLE "wasm32-unknown-emscripten" CACHE STRING "")
14-
set(LLVM_BUILD_STATIC ON CACHE BOOL "")
1516
set(LLVM_ENABLE_RTTI ON CACHE BOOL "")
16-
set(LLVM_ENABLE_PIC ON CACHE BOOL "")
17+
18+
# all of these are to try to solve this problem:
19+
# em++: error: undefined exported symbol: "_LLVMAddSymbol" [-Wundefined] [-Werror]
20+
# within mlir_runner_utils and mlir_c_runner_utils
21+
# for some mysterious reason (worked before!!!) but we can't use those libs anyway
22+
#set(LLVM_NO_DEAD_STRIP ON CACHE BOOL "")
23+
## sets the correct LLVM_C_ABI macro
24+
set(LLVM_ENABLE_LLVM_C_EXPORT_ANNOTATIONS ON CACHE BOOL "")
25+
## this doesn't do anything see https://github.com/llvm/llvm-project/pull/171060
26+
#set(MLIR_ENABLE_EXECUTION_ENGINE OFF CACHE BOOL "")
27+
# this fixes but i have no idea why
28+
set(LLVM_ENABLE_PIC OFF CACHE BOOL "")
1729

1830
set(MLIR_ENABLE_BINDINGS_PYTHON ON CACHE BOOL "")
19-
set(MLIR_ENABLE_EXECUTION_ENGINE ON CACHE BOOL "")
20-
set(MLIR_ENABLE_SPIRV_CPU_RUNNER ON CACHE BOOL "")
2131

2232
set(LLVM_BUILD_DOCS OFF CACHE BOOL "")
2333
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")

scripts/llvm_wasm/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ minimum-version = "0.10"
3737
build-dir = "build"
3838
cmake.source-dir = "../../third_party/llvm-project/llvm"
3939
build.targets = ["install-mlirdevelopment-distribution"]
40+
build.tool-args = ["-k", "0"]
4041
install.components = ["install-mlirdevelopment-distribution"]
4142

4243
cmake.args = ["-C", "llvm_wasm_cache.cmake"]
@@ -59,3 +60,4 @@ LLVM_NATIVE_TOOL_DIR = { env = "LLVM_NATIVE_TOOL_DIR", default = "" }
5960
LLVM_TABLEGEN = { env = "LLVM_TABLEGEN", default = "" }
6061
MLIR_LINALG_ODS_YAML_GEN = { env = "MLIR_LINALG_ODS_YAML_GEN", default = "" }
6162
MLIR_TABLEGEN = { env = "MLIR_TABLEGEN", default = "" }
63+
MLIR_ENABLE_EXECUTION_ENGINE = "OFF"

0 commit comments

Comments
 (0)