Skip to content

Commit 5aebcc7

Browse files
authored
Disable LLVM warnings and enable LTO in emscripten build (#487)
Fixed #148 and last task of #156
1 parent 0c8ef10 commit 5aebcc7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

crates/llvm-builder/src/platforms/wasm32_emscripten.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ fn build_host(
9191
target_directory.to_string_lossy()
9292
),
9393
"-DLLVM_BUILD_SHARED_LIBS='Off'",
94+
"-DLLVM_ENABLE_WARNINGS='Off'",
9495
"-DCMAKE_BUILD_TYPE='Release'",
9596
&format!(
9697
"-DLLVM_TARGETS_TO_BUILD='WebAssembly;{}'",
@@ -152,10 +153,8 @@ fn build_target(
152153
"Ninja",
153154
"-DLINKER_SUPPORTS_COLOR_DIAGNOSTICS=0",
154155
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=1",
155-
// Enable thin LTO but emscripten has various issues with it.
156-
// FIXME: https://github.com/paritytech/revive/issues/148
157-
//"-DLLVM_ENABLE_LTO='Thin'",
158-
//"-DCMAKE_EXE_LINKER_FLAGS='-Wl,-u,htons -Wl,-u,htonl -Wl,-u,fileno -Wl,-u,ntohs'",
156+
"-DLLVM_ENABLE_LTO='Thin'",
157+
"-DCMAKE_EXE_LINKER_FLAGS='-Wl,-u,htons -Wl,-u,htonl -Wl,-u,fileno -Wl,-u,ntohs'",
159158
&format!(
160159
"-DCMAKE_INSTALL_PREFIX='{}'",
161160
target_directory.to_string_lossy()

0 commit comments

Comments
 (0)