aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/FileCheck/FileCheck.cpp
diff options
context:
space:
mode:
authorAnutosh Bhat <andersonbhat491@gmail.com>2025-03-17 16:44:49 +0530
committerGitHub <noreply@github.com>2025-03-17 11:14:49 +0000
commite57cd100ca297cf81854e35cccbf703edddd4aad (patch)
treea318b95a45a1ab027bffef337ff23c7540095b62 /llvm/lib/FileCheck/FileCheck.cpp
parent6eb32a2fa0d16bea03f22dd2078f53da6d9352cd (diff)
downloadllvm-e57cd100ca297cf81854e35cccbf703edddd4aad.zip
llvm-e57cd100ca297cf81854e35cccbf703edddd4aad.tar.gz
llvm-e57cd100ca297cf81854e35cccbf703edddd4aad.tar.bz2
Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (#131578)
While building llvm (clang, lld) against emscripten we see this [error](https://github.com/emscripten-forge/recipes/actions/runs/13803029307/job/38608794602#step:9:1715) ``` │ │ In file included from $SRC_DIR/llvm/lib/Frontend/OpenACC/ACC.cpp:9: │ │ $SRC_DIR/build/include/llvm/Frontend/OpenACC/ACC.h.inc:192:1: error: unknown type name 'LLVM_ABI' │ │ 192 | LLVM_ABI Directive getOpenACCDirectiveKind(llvm::StringRef Str); │ │ | ^ │ │ $SRC_DIR/build/include/llvm/Frontend/OpenACC/ACC.h.inc:192:19: error: expected ';' after top level declarator │ │ 192 | LLVM_ABI Directive getOpenACCDirectiveKind(llvm::StringRef Str); │ │ | ^ ``` Now this was happening because we weren't defining LLVM_ABI correctly when building against emscripten. If you see [llvm/Support/Compiler.h](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/Compiler.h#L206-L210), the condition only checked for the platform __WASM__ . Now Emscripten targets WebAssembly but doesn't imply the platform by default so the check isn't complete to define LLVM_ABI. The successful build after using this patch can be seen [here](https://github.com/emscripten-forge/recipes/actions/runs/13805214092/job/38614585621)
Diffstat (limited to 'llvm/lib/FileCheck/FileCheck.cpp')
0 files changed, 0 insertions, 0 deletions