diff --git a/.github/workflows/MacOS-arm.yml b/.github/workflows/MacOS-arm.yml index ac5dc8f54..ff5bd09a7 100644 --- a/.github/workflows/MacOS-arm.yml +++ b/.github/workflows/MacOS-arm.yml @@ -22,6 +22,13 @@ jobs: fail-fast: false matrix: include: + - name: osx15-arm-clang-clang-repl-20 + os: macos-15 + compiler: clang + clang-runtime: '20' + cling: Off + llvm_enable_projects: "clang" + llvm_targets_to_build: "host" - name: osx15-arm-clang-clang-repl-19 os: macos-15 compiler: clang @@ -252,6 +259,12 @@ jobs: fail-fast: false matrix: include: + - name: osx15-arm-clang-clang-repl-20 + os: macos-15 + compiler: clang + clang-runtime: '20' + cling: Off + cppyy: Off - name: osx15-arm-clang-clang-repl-19-cppyy os: macos-15 compiler: clang diff --git a/.github/workflows/MacOS.yml b/.github/workflows/MacOS.yml index ea84aa1a7..74d51af2b 100644 --- a/.github/workflows/MacOS.yml +++ b/.github/workflows/MacOS.yml @@ -22,6 +22,13 @@ jobs: fail-fast: false matrix: include: + - name: osx13-x86-clang-clang-repl-20 + os: macos-13 + compiler: clang + clang-runtime: '20' + cling: Off + llvm_enable_projects: "clang" + llvm_targets_to_build: "host" - name: osx13-x86-clang-clang-repl-19 os: macos-13 compiler: clang @@ -236,6 +243,12 @@ jobs: fail-fast: false matrix: include: + - name: osx13-x86-clang-clang-repl-20 + os: macos-13 + compiler: clang + clang-runtime: '20' + cling: Off + cppyy: Off - name: osx13-x86-clang-clang-repl-19-cppyy os: macos-13 compiler: clang diff --git a/.github/workflows/Ubuntu-arm.yml b/.github/workflows/Ubuntu-arm.yml index 1d1cdaa71..3083407c4 100644 --- a/.github/workflows/Ubuntu-arm.yml +++ b/.github/workflows/Ubuntu-arm.yml @@ -22,6 +22,13 @@ jobs: fail-fast: false matrix: include: + - name: ubu24-arm-gcc12-clang-repl-20 + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '20' + cling: Off + llvm_enable_projects: "clang" + llvm_targets_to_build: "host;NVPTX" - name: ubu24-arm-gcc12-clang-repl-19 os: ubuntu-24.04-arm compiler: gcc-12 @@ -240,6 +247,12 @@ jobs: fail-fast: false matrix: include: + - name: ubu24-arm-gcc12-clang-repl-20 + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '20' + cling: Off + cppyy: Off - name: ubu24-arm-gcc12-clang-repl-19-cppyy os: ubuntu-24.04-arm compiler: gcc-12 diff --git a/.github/workflows/Ubuntu.yml b/.github/workflows/Ubuntu.yml index 85e5c8af7..e9e7f3c13 100644 --- a/.github/workflows/Ubuntu.yml +++ b/.github/workflows/Ubuntu.yml @@ -22,6 +22,13 @@ jobs: fail-fast: false matrix: include: + - name: ubu24-x86-gcc12-clang-repl-20 + os: ubuntu-24.04 + compiler: gcc-12 + clang-runtime: '20' + cling: Off + llvm_enable_projects: "clang" + llvm_targets_to_build: "host;NVPTX" - name: ubu24-x86-gcc12-clang-repl-19 os: ubuntu-24.04 compiler: gcc-12 @@ -240,6 +247,12 @@ jobs: fail-fast: false matrix: include: + - name: ubu24-x86-gcc12-clang-repl-20 + os: ubuntu-24.04 + compiler: gcc-12 + clang-runtime: '20' + cling: Off + cppyy: Off - name: ubu24-x86-gcc12-clang-repl-19-cppyy os: ubuntu-24.04 compiler: gcc-12 diff --git a/.github/workflows/Windows-arm.yml b/.github/workflows/Windows-arm.yml index 7507592ea..6e5c36a3d 100644 --- a/.github/workflows/Windows-arm.yml +++ b/.github/workflows/Windows-arm.yml @@ -21,10 +21,10 @@ jobs: fail-fast: false matrix: include: - - name: win11-msvc-clang-repl-19 + - name: win11-msvc-clang-repl-20 os: windows-11-arm compiler: msvc - clang-runtime: '19' + clang-runtime: '20' cling: Off llvm_enable_projects: "clang" llvm_targets_to_build: "host;NVPTX" @@ -225,10 +225,10 @@ jobs: fail-fast: false matrix: include: - - name: win11-msvc-clang-repl-19 + - name: win11-msvc-clang-repl-20 os: windows-11-arm compiler: msvc - clang-runtime: '19' + clang-runtime: '20' cling: Off cppyy: Off diff --git a/.github/workflows/Windows.yml b/.github/workflows/Windows.yml index addb6e060..933a2e05d 100644 --- a/.github/workflows/Windows.yml +++ b/.github/workflows/Windows.yml @@ -21,10 +21,10 @@ jobs: fail-fast: false matrix: include: - - name: win2025-msvc-clang-repl-19 + - name: win2025-msvc-clang-repl-20 os: windows-2025 compiler: msvc - clang-runtime: '19' + clang-runtime: '20' cling: Off llvm_enable_projects: "clang" llvm_targets_to_build: "host;NVPTX" @@ -225,10 +225,10 @@ jobs: fail-fast: false matrix: include: - - name: win2025-msvc-clang-repl-19 + - name: win2025-msvc-clang-repl-20 os: windows-2025 compiler: msvc - clang-runtime: '19' + clang-runtime: '20' cling: Off cppyy: Off diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index fb4d9f1fb..5e626bb07 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -21,9 +21,9 @@ jobs: fail-fast: false matrix: include: - - name: osx15-arm-clang-repl-19-emscripten_wasm + - name: osx15-arm-clang-repl-20-emscripten_wasm os: macos-15 - clang-runtime: '19' + clang-runtime: '20' cling: Off micromamba_shell_init: bash emsdk_ver: "3.1.73" diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 99151473a..a0144c453 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -49,6 +49,34 @@ jobs: llvm_enable_projects: "clang;lld" llvm_targets_to_build: "WebAssembly" emsdk_ver: "3.1.73" + - name: ubu24-arm-clang-repl-20-emscripten + os: ubuntu-24.04-arm + clang-runtime: '20' + cling: Off + llvm_enable_projects: "clang;lld" + llvm_targets_to_build: "WebAssembly" + emsdk_ver: "3.1.73" + - name: osx15-arm-clang-repl-20-emscripten + os: macos-15 + clang-runtime: '20' + cling: Off + llvm_enable_projects: "clang;lld" + llvm_targets_to_build: "WebAssembly" + emsdk_ver: "3.1.73" + - name: ubu24-x86-clang-repl-20-emscripten + os: ubuntu-24.04 + clang-runtime: '20' + cling: Off + llvm_enable_projects: "clang;lld" + llvm_targets_to_build: "WebAssembly" + emsdk_ver: "3.1.73" + - name: win2025-x86-clang-repl-20-emscripten + os: windows-2025 + clang-runtime: '20' + cling: Off + llvm_enable_projects: "clang;lld" + llvm_targets_to_build: "WebAssembly" + emsdk_ver: "3.1.73" steps: - uses: actions/checkout@v4 @@ -220,7 +248,7 @@ jobs: else # Apply patches llvm_vers=$(echo "${{ matrix.clang-runtime }}" | tr '[:lower:]' '[:upper:]') - if [[ "${llvm_vers}" == "19" ]]; then + if [[ "${llvm_vers}" == "19" || "${llvm_vers}" == "20" ]]; then git apply -v ../patches/llvm/emscripten-clang${{ matrix.clang-runtime }}-*.patch echo "Apply emscripten-clang${{ matrix.clang-runtime }}-*.patch patches:" fi @@ -329,6 +357,11 @@ jobs: git apply -v emscripten-clang19-2-shift-temporary-files-to-tmp-dir.patch git apply -v emscripten-clang19-3-remove-zdefs.patch } + elseif ( "${{ matrix.clang-runtime }}" -imatch "20" ) + { + git apply -v Windows-emscripten-clang20-1-CrossCompile.patch + git apply -v emscripten-clang20-2-shift-temporary-files-to-tmp-dir.patch + } cd build echo "Apply clang${{ matrix.clang-runtime }}-*.patch patches:" emcmake cmake -DCMAKE_BUILD_TYPE=Release ` @@ -414,6 +447,30 @@ jobs: cling: Off micromamba_shell_init: powershell emsdk_ver: "3.1.73" + - name: ubu24-x86-clang-repl-20-emscripten_wasm + os: ubuntu-24.04 + clang-runtime: '20' + cling: Off + micromamba_shell_init: bash + emsdk_ver: "3.1.73" + - name: osx15-arm-clang-repl-20-emscripten_wasm + os: macos-15 + clang-runtime: '20' + cling: Off + micromamba_shell_init: bash + emsdk_ver: "3.1.73" + - name: ubu24-arm-clang-repl-20-emscripten_wasm + os: ubuntu-24.04-arm + clang-runtime: '20' + cling: Off + micromamba_shell_init: bash + emsdk_ver: "3.1.73" + - name: win2025-x86-clang-repl-20-emscripten + os: windows-2025 + clang-runtime: '20' + cling: Off + micromamba_shell_init: powershell + emsdk_ver: "3.1.73" steps: - uses: actions/checkout@v4 diff --git a/CMakeLists.txt b/CMakeLists.txt index 465af0e8b..6bf78a214 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,14 +68,14 @@ include(GNUInstallDirs) ## Define supported version of clang and llvm set(CLANG_MIN_SUPPORTED 13.0) - set(CLANG_MAX_SUPPORTED "19.1.x") - set(CLANG_VERSION_UPPER_BOUND 20.0.0) + set(CLANG_MAX_SUPPORTED "20.1.x") + set(CLANG_VERSION_UPPER_BOUND 21.0.0) set(LLD_MIN_SUPPORTED 13.0) - set(LLD_MAX_SUPPORTED "19.1.x") - set(LLD_VERSION_UPPER_BOUND 20.0.0) + set(LLD_MAX_SUPPORTED "20.1.x") + set(LLD_VERSION_UPPER_BOUND 21.0.0) set(LLVM_MIN_SUPPORTED 13.0) - set(LLVM_MAX_SUPPORTED "19.1.x") - set(LLVM_VERSION_UPPER_BOUND 20.0.0) + set(LLVM_MAX_SUPPORTED "20.1.x") + set(LLVM_VERSION_UPPER_BOUND 21.0.0) ## Set Cmake packages search order diff --git a/Emscripten-build-instructions.md b/Emscripten-build-instructions.md index 512aa4d7e..3786b924b 100644 --- a/Emscripten-build-instructions.md +++ b/Emscripten-build-instructions.md @@ -42,12 +42,11 @@ $env:PWD_DIR= $PWD.Path $env:SYSROOT_PATH="$env:EMSDK/upstream/emscripten/cache/sysroot" ``` -Now clone the 19.x release of the LLVM project repository and CppInterOp (the building of the emscripten version of llvm can be +Now clone the 20.x release of the LLVM project repository and CppInterOp (the building of the emscripten version of llvm can be avoided by executing micromamba install llvm -c and setting the LLVM_BUILD_DIR/$env:LLVM_BUILD_DIR appropriately) - ```bash -git clone --depth=1 --branch release/19.x https://github.com/llvm/llvm-project.git +git clone --depth=1 --branch release/20.x https://github.com/llvm/llvm-project.git git clone --depth=1 https://github.com/compiler-research/CppInterOp.git ``` @@ -56,7 +55,7 @@ executing ```bash cd ./llvm-project/ -git apply -v ../CppInterOp/patches/llvm/emscripten-clang19-*.patch +git apply -v ../CppInterOp/patches/llvm/emscripten-clang20-*.patch ``` On Windows execute the following @@ -65,9 +64,8 @@ On Windows execute the following cd .\llvm-project\ cp -r ..\patches\llvm\emscripten-clang${{ matrix.clang-runtime }}* cp -r ..\patches\llvm\Windows-emscripten-clang${{ matrix.clang-runtime }}* -git apply -v Windows-emscripten-clang19-1-CrossCompile.patch -git apply -v emscripten-clang19-2-shift-temporary-files-to-tmp-dir.patch -git apply -v emscripten-clang19-3-remove-zdefs.patch +git apply -v Windows-emscripten-clang20-1-CrossCompile.patch +git apply -v emscripten-clang20-2-shift-temporary-files-to-tmp-dir.patch ``` We are now in a position to build an emscripten build of llvm by executing the following on Linux diff --git a/README.md b/README.md index cc1802dcc..2cfe88285 100644 --- a/README.md +++ b/README.md @@ -115,10 +115,10 @@ git clone --depth=1 https://github.com/compiler-research/cppyy-backend.git #### Setup Clang-REPL -Clone the 19.x release of the LLVM project repository. +Clone the 20.x release of the LLVM project repository. ```bash -git clone --depth=1 --branch release/19.x https://github.com/llvm/llvm-project.git +git clone --depth=1 --branch release/20.x https://github.com/llvm/llvm-project.git cd llvm-project ``` diff --git a/docs/DevelopersDocumentation.rst b/docs/DevelopersDocumentation.rst index cde4282d4..925acc1cb 100644 --- a/docs/DevelopersDocumentation.rst +++ b/docs/DevelopersDocumentation.rst @@ -34,11 +34,11 @@ library Setup Clang-REPL ****************** -Clone the 19.x release of the LLVM project repository. +Clone the 20.x release of the LLVM project repository. .. code:: bash - git clone --depth=1 --branch release/19.x https://github.com/llvm/llvm-project.git + git clone --depth=1 --branch release/20.x https://github.com/llvm/llvm-project.git cd llvm-project For Clang 16 & 17, the following patches required for development work. To apply diff --git a/docs/Emscripten-build-instructions.rst b/docs/Emscripten-build-instructions.rst index 22f9e3f89..d9fd7b2a4 100644 --- a/docs/Emscripten-build-instructions.rst +++ b/docs/Emscripten-build-instructions.rst @@ -53,7 +53,7 @@ and on Windows execute in Powershell $env:PWD_DIR= $PWD.Path $env:SYSROOT_PATH="$env:EMSDK/upstream/emscripten/cache/sysroot" -Now clone the 19.x release of the LLVM project repository and CppInterOp +Now clone the 20.x release of the LLVM project repository and CppInterOp (the building of the emscripten version of llvm can be avoided by executing micromamba install llvm -c and setting the LLVM_BUILD_DIR/$env:LLVM_BUILD_DIR @@ -61,7 +61,7 @@ appropriately) .. code:: bash - git clone --depth=1 --branch release/19.x https://github.com/llvm/llvm-project.git + git clone --depth=1 --branch release/20.x https://github.com/llvm/llvm-project.git git clone --depth=1 https://github.com/compiler-research/CppInterOp.git Now move into the cloned llvm-project folder and apply the required patches. On Linux and osx this @@ -70,7 +70,7 @@ executing .. code:: bash cd ./llvm-project/ - git apply -v ../CppInterOp/patches/llvm/emscripten-clang19-*.patch + git apply -v ../CppInterOp/patches/llvm/emscripten-clang20-*.patch On Windows execute the following @@ -79,9 +79,8 @@ On Windows execute the following cd .\llvm-project\ cp -r ..\patches\llvm\emscripten-clang${{ matrix.clang-runtime }}* cp -r ..\patches\llvm\Windows-emscripten-clang${{ matrix.clang-runtime }}* - git apply -v Windows-emscripten-clang19-1-CrossCompile.patch - git apply -v emscripten-clang19-2-shift-temporary-files-to-tmp-dir.patch - git apply -v emscripten-clang19-3-remove-zdefs.patch + git apply -v Windows-emscripten-clang20-1-CrossCompile.patch + git apply -v emscripten-clang20-2-shift-temporary-files-to-tmp-dir.patch We are now in a position to build an emscripten build of llvm by executing the following on Linux and osx diff --git a/docs/InstallationAndUsage.rst b/docs/InstallationAndUsage.rst index cb6be3d0a..d4f172cda 100644 --- a/docs/InstallationAndUsage.rst +++ b/docs/InstallationAndUsage.rst @@ -34,11 +34,11 @@ library Setup Clang-REPL ****************** -Clone the 19.x release of the LLVM project repository. +Clone the 20.x release of the LLVM project repository. .. code:: bash - git clone --depth=1 --branch release/19.x https://github.com/llvm/llvm-project.git + git clone --depth=1 --branch release/20.x https://github.com/llvm/llvm-project.git cd llvm-project For Clang 16 & 17, the following patches required for development work. To apply diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index 2686b3d56..2af6bcf0e 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -25,7 +25,7 @@ infrastructure are described first. ## External Dependencies - CppInterOp now works with: - - llvm19 + - llvm20 ## Introspection diff --git a/lib/Interpreter/Paths.cpp b/lib/Interpreter/Paths.cpp index bacbaf1e5..17abb633e 100644 --- a/lib/Interpreter/Paths.cpp +++ b/lib/Interpreter/Paths.cpp @@ -174,12 +174,29 @@ void CopyIncludePaths(const clang::HeaderSearchOptions& Opts, if (!withSystem) continue; if (withFlags) incpaths.push_back("-isystem"); break; - + // Option was removed in llvm 20. Git log message below. + // git log --grep="index-header" + // commit 19b4f17d4c0ae12725050d09f04f85bccc686d8e + // Author: Jan Svoboda + // Date: Thu Oct 31 16:04:35 2024 -0700 + // + // [clang][lex] Remove `-index-header-map` (#114459) + // + // This PR removes the `-index-header-map` functionality from Clang. + // AFAIK this was only used internally at Apple and is now dead code. + // The main motivation behind this change is to enable the removal of + // `HeaderFileInfo::Framework` member and reducing the size of that + // data structure. + // + // rdar://84036149 + +#if CLANG_VERSION_MAJOR < 20 case frontend::IndexHeaderMap: if (!withSystem) continue; if (withFlags) incpaths.push_back("-index-header-map"); if (withFlags) incpaths.push_back(E.IsFramework? "-F" : "-I"); break; +#endif case frontend::CSystem: if (!withSystem) continue; diff --git a/patches/llvm/Windows-emscripten-clang20-1-CrossCompile.patch b/patches/llvm/Windows-emscripten-clang20-1-CrossCompile.patch new file mode 100644 index 000000000..a1ffeccc8 --- /dev/null +++ b/patches/llvm/Windows-emscripten-clang20-1-CrossCompile.patch @@ -0,0 +1,20 @@ +diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake +index 39b4abaa0..474ceddbb 100644 +--- a/llvm/cmake/modules/CrossCompile.cmake ++++ b/llvm/cmake/modules/CrossCompile.cmake +@@ -74,10 +74,12 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) + endif() + + add_custom_command(OUTPUT ${${project_name}_${target_name}_BUILD}/CMakeCache.txt +- COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" ++ COMMAND ${CMAKE_COMMAND} -G Ninja + -DCMAKE_MAKE_PROGRAM="${CMAKE_MAKE_PROGRAM}" +- -DCMAKE_C_COMPILER_LAUNCHER="${CMAKE_C_COMPILER_LAUNCHER}" +- -DCMAKE_CXX_COMPILER_LAUNCHER="${CMAKE_CXX_COMPILER_LAUNCHER}" ++ -DCMAKE_C_COMPILER="clang-cl" ++ -DCMAKE_CXX_COMPILER="clang-cl" ++ -DCMAKE_ASM_MASM_COMPILER=llvm-ml ++ -DCMAKE_ASM_MASM_FLAGS="-m64" + ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_CURRENT_SOURCE_DIR} + ${CROSS_TOOLCHAIN_FLAGS_${project_name}_${target_name}} + -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE diff --git a/patches/llvm/emscripten-clang20-1-CrossCompile.patch b/patches/llvm/emscripten-clang20-1-CrossCompile.patch new file mode 100644 index 000000000..4aa6b1539 --- /dev/null +++ b/patches/llvm/emscripten-clang20-1-CrossCompile.patch @@ -0,0 +1,16 @@ +diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake +index 6af47b51d4c6..c635e7f5be9e 100644 +--- a/llvm/cmake/modules/CrossCompile.cmake ++++ b/llvm/cmake/modules/CrossCompile.cmake +@@ -70,8 +70,8 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype) + add_custom_command(OUTPUT ${${project_name}_${target_name}_BUILD}/CMakeCache.txt + COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" + -DCMAKE_MAKE_PROGRAM="${CMAKE_MAKE_PROGRAM}" +- -DCMAKE_C_COMPILER_LAUNCHER="${CMAKE_C_COMPILER_LAUNCHER}" +- -DCMAKE_CXX_COMPILER_LAUNCHER="${CMAKE_CXX_COMPILER_LAUNCHER}" ++ -DCMAKE_C_COMPILER="clang" ++ -DCMAKE_CXX_COMPILER="clang++" + ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_CURRENT_SOURCE_DIR} + ${CROSS_TOOLCHAIN_FLAGS_${project_name}_${target_name}} + -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE + diff --git a/patches/llvm/emscripten-clang20-2-shift-temporary-files-to-tmp-dir.patch b/patches/llvm/emscripten-clang20-2-shift-temporary-files-to-tmp-dir.patch new file mode 100644 index 000000000..32ac45c13 --- /dev/null +++ b/patches/llvm/emscripten-clang20-2-shift-temporary-files-to-tmp-dir.patch @@ -0,0 +1,15 @@ +diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp +index aa10b160ccf8..184867e2b55f 100644 +--- a/clang/lib/Interpreter/Wasm.cpp ++++ b/clang/lib/Interpreter/Wasm.cpp +@@ -76,8 +76,8 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { + llvm::TargetMachine *TargetMachine = Target->createTargetMachine( + PTU.TheModule->getTargetTriple(), "", "", TO, llvm::Reloc::Model::PIC_); + PTU.TheModule->setDataLayout(TargetMachine->createDataLayout()); +- std::string ObjectFileName = PTU.TheModule->getName().str() + ".o"; +- std::string BinaryFileName = PTU.TheModule->getName().str() + ".wasm"; ++ std::string ObjectFileName = "/tmp/" + PTU.TheModule->getName().str() + ".o"; ++ std::string BinaryFileName = "/tmp/" + PTU.TheModule->getName().str() + ".wasm"; + + std::error_code Error; + llvm::raw_fd_ostream ObjectFileOutput(llvm::StringRef(ObjectFileName), Error); diff --git a/unittests/CppInterOp/FunctionReflectionTest.cpp b/unittests/CppInterOp/FunctionReflectionTest.cpp index 5d926339e..b45f4a190 100644 --- a/unittests/CppInterOp/FunctionReflectionTest.cpp +++ b/unittests/CppInterOp/FunctionReflectionTest.cpp @@ -1379,7 +1379,9 @@ TEST(FunctionReflectionTest, IsStaticMethod) { TEST(FunctionReflectionTest, GetFunctionAddress) { #ifdef EMSCRIPTEN +#if CLANG_VERSION_MAJOR < 20 GTEST_SKIP() << "Test fails for Emscipten builds"; +#endif #endif if (llvm::sys::RunningOnValgrind()) GTEST_SKIP() << "XFAIL due to Valgrind report"; @@ -1428,7 +1430,9 @@ TEST(FunctionReflectionTest, IsVirtualMethod) { TEST(FunctionReflectionTest, JitCallAdvanced) { #ifdef EMSCRIPTEN +#if CLANG_VERSION_MAJOR < 20 GTEST_SKIP() << "Test fails for Emscipten builds"; +#endif #endif if (llvm::sys::RunningOnValgrind()) GTEST_SKIP() << "XFAIL due to Valgrind report"; @@ -1783,7 +1787,9 @@ TEST(FunctionReflectionTest, GetFunctionArgDefault) { TEST(FunctionReflectionTest, Construct) { #ifdef EMSCRIPTEN +#if CLANG_VERSION_MAJOR < 20 GTEST_SKIP() << "Test fails for Emscipten builds"; +#endif #endif if (llvm::sys::RunningOnValgrind()) GTEST_SKIP() << "XFAIL due to Valgrind report"; @@ -1844,7 +1850,9 @@ TEST(FunctionReflectionTest, Construct) { // Test nested constructor calls TEST(FunctionReflectionTest, ConstructNested) { #ifdef EMSCRIPTEN +#if CLANG_VERSION_MAJOR < 20 GTEST_SKIP() << "Test fails for Emscipten builds"; +#endif #endif if (llvm::sys::RunningOnValgrind()) GTEST_SKIP() << "XFAIL due to Valgrind report"; @@ -1984,4 +1992,4 @@ TEST(FunctionReflectionTest, UndoTest) { EXPECT_EQ(ret, 1); #endif #endif - } \ No newline at end of file + } diff --git a/unittests/CppInterOp/VariableReflectionTest.cpp b/unittests/CppInterOp/VariableReflectionTest.cpp index cf906ead9..be85bb9f6 100644 --- a/unittests/CppInterOp/VariableReflectionTest.cpp +++ b/unittests/CppInterOp/VariableReflectionTest.cpp @@ -264,7 +264,9 @@ CODE TEST(VariableReflectionTest, GetVariableOffset) { #ifdef EMSCRIPTEN +#if CLANG_VERSION_MAJOR < 20 GTEST_SKIP() << "Test fails for Emscipten builds"; +#endif #endif std::vector Decls; #define Stringify(s) Stringifyx(s)