diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 73c2dfa1e..55238bf11 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,6 +71,11 @@ jobs: cd test ..\build\${{ matrix.build_type }}\c3c.exe compile-test unit -O1 + - name: Test python script + run: | + py msvc_build_libraries.py --accept-license + dir msvc_sdk + - name: upload artifacts uses: actions/upload-artifact@v3 with: @@ -193,7 +198,7 @@ jobs: fail-fast: false matrix: build_type: [Release, Debug] - llvm_version: [15, 16, 17, 18] + llvm_version: [15, 16, 17, 18, 19] steps: - uses: actions/checkout@v4 @@ -207,7 +212,7 @@ jobs: if [[ "${{matrix.llvm_version}}" < 16 ]]; then sudo apt remove libllvm15 fi - if [[ "${{matrix.llvm_version}}" < 18 ]]; then + if [[ "${{matrix.llvm_version}}" < 19 ]]; then sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{matrix.llvm_version}} main" sudo apt-get update sudo apt-get install -y -t llvm-toolchain-focal-${{matrix.llvm_version}} libpolly-${{matrix.llvm_version}}-dev \ @@ -222,6 +227,7 @@ jobs: libmlir-${{matrix.llvm_version}}-dev mlir-${{matrix.llvm_version}}-tools fi - name: CMake + if: matrix.llvm_version != 18 run: | cmake -B build \ -G Ninja \ @@ -234,6 +240,20 @@ jobs: -DCMAKE_DLLTOOL=llvm-dlltool-${{matrix.llvm_version}} \ -DC3_LLVM_VERSION=${{matrix.llvm_version}} cmake --build build + - name: CMake18 + if: matrix.llvm_version == 18 + run: | + cmake -B build \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ + -DCMAKE_C_COMPILER=clang-${{matrix.llvm_version}} \ + -DCMAKE_CXX_COMPILER=clang++-${{matrix.llvm_version}} \ + -DCMAKE_LINKER=lld-link-${{matrix.llvm_version}} \ + -DCMAKE_OBJCOPY=llvm-objcopy-${{matrix.llvm_version}} \ + -DCMAKE_STRIP=llvm-strip-${{matrix.llvm_version}} \ + -DCMAKE_DLLTOOL=llvm-dlltool-${{matrix.llvm_version}} \ + -DC3_LLVM_VERSION=18.1 + cmake --build build - name: Compile and run some examples run: | @@ -418,7 +438,7 @@ jobs: fail-fast: false matrix: build_type: [Release, Debug] - llvm_version: [15, 16] + llvm_version: [15, 16, 17] steps: - uses: actions/checkout@v4 - name: Download LLVM diff --git a/CMakeLists.txt b/CMakeLists.txt index db94474a7..87921fd6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,7 @@ if (NOT WIN32) find_package(CURL) endif() if (NOT C3_LLVM_VERSION STREQUAL "auto") - if (${C3_LLVM_VERSION} VERSION_LESS 15 OR ${C3_LLVM_VERSION} VERSION_GREATER 18) + if (${C3_LLVM_VERSION} VERSION_LESS 15 OR ${C3_LLVM_VERSION} VERSION_GREATER 19) message(FATAL_ERROR "LLVM ${C3_LLVM_VERSION} is not supported!") endif() endif() diff --git a/lib/std/core/mem.c3 b/lib/std/core/mem.c3 index 7c94a37c8..f9755276b 100644 --- a/lib/std/core/mem.c3 +++ b/lib/std/core/mem.c3 @@ -430,7 +430,7 @@ macro void @pool(TempAllocator* #other_temp = null; @body) @builtin TempAllocator* original = current; if (current == (void*)#other_temp) current = allocator::temp_allocator_next(); $endif - usz mark = current.mark(); + usz mark = current.used; defer { current.reset(mark);