Skip to content

Commit 60247ce

Browse files
Migrating to vs2026 (#173)
* update CMake presets for Visual Studio 2026 * feat: Add CMakePresets.json for cross-platform build, configure, and test presets. * feat: Add CMake build system and VS Code debug configurations for the TypeScript compiler. * feat: Update GC library references and version to 8.2.8 across build scripts and configurations * fix: Add missing parentheses in while loop conditions for parser decorators and modifiers * feat: Update CMake presets for Visual Studio 2022 and 2026 with new configurations * chore: Update subproject commit for llvm-project to latest version * fix: Update description for Clang++ generator in CMake presets * feat: Update build scripts for Visual Studio 2026 compatibility and add missing configurations * chore: Update subproject commit for llvm-project to latest version * feat: Update build scripts to disable shared libraries for Visual Studio and Ninja configurations * feat: Update GC and libatomic_ops versions in preparation scripts to 8.2.8 and 7.8.2 * chore: Update subproject commit for llvm-project to latest version * feat: Update CMake configuration for Visual Studio 2026 compatibility and adjust runtime library settings * feat: Update launch configuration for Visual Studio 2026 compatibility * feat: Enhance debugging support with CRT leak checking in debug mode * chore: Remove memory leak dump call from JIT execution * feat: Add memory leak prevention comment and remove unused memory leak dump call in JIT execution * feat: Update debug memory leak checking configuration in main function * fix: Prevent false positive memory leak reports in release builds by enabling stack trace printing * fixes to test runner * update build scripts * script update * more build scripts update * fix for test * update launch configurations for VS 2026 build paths and fix bug with not init local variable * Add C linkage for GC wrappers and export runtime symbols for JIT integration * Update build scripts for LLVM integration and enhance JIT error handling * Refactor JIT symbol registration to use DynamicLibrary for CRT entry points * Enhance build scripts for Visual Studio 2026 integration and update library linking for static CRT compatibility * Adjust GlobalConstructorOp priority to prevent crashes during CRT initialization * Update build scripts for GC and TSC to set executable permissions and adjust library copy paths * Prefix temporary object/shared-lib filenames to avoid conflicts during parallel test execution * Include process ID in temporary output file names to prevent collisions during parallel test execution * Update GC and libatomic_ops versions in CI workflows for consistency * Update build scripts to use cmake install command for better package management * Refactor GC linking logic in buildExe function to differentiate between platforms * Refactor GC library linking to use variable for better platform compatibility * Refactor GC library linking to simplify logic and ensure consistent usage * Fix CMake configuration for GC library path and message output * added test file for debug build * Update test runner paths for shared libraries in batch file generation * Update shared library filename handling in createSharedMultiBatchFile * Enhance createSharedMultiBatchFile to isolate test execution in unique working directories and adjust output paths for better parallel test handling * Enhance LLVMCodeHelper to set function linkage as internal and improve debug info handling for global variables * Update CMakeLists.txt to use static CRT for MSVC configurations and ensure consistency across all targets * Update CMakeLists.txt to correct GC library path for MSVC and test runner * Fix GC library path check and remove redundant copy commands in prepare_3rdParty.bat * Refactor CMake configuration to utilize BDWgc package for garbage collector integration and update test-runner paths for improved compatibility * Update README.md to enhance structure, clarify build instructions, and improve formatting for code examples * Update CMake configuration to disable documentation generation during GC build and installation * Update CI workflows to use Windows-latest and target Visual Studio 2026 for GC configuration * Refactor CI workflows to remove redundant copy commands and disable shared library builds for GC * fixes to vs version * update release workflow to use vs2026 * Update CMake configuration to use GitHub workspace for installation paths * Update CACHE_VERSION to v9 in CI workflows and remove redundant copy commands * Update CMake configuration for GC to set default policy and runtime library * Refactor reference handling: introduce Ref and Deref types, update MLIR methods, and add tests * Increase parallel build jobs to 20 for debug and release scripts, and remove deprecated Visual Studio 2022 build script
1 parent e3ae5fa commit 60247ce

58 files changed

Lines changed: 990 additions & 725 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cmake-test-release-linux.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ on:
1313
env:
1414
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
1515
BUILD_TYPE: Release
16-
CACHE_VERSION: v8
16+
CACHE_VERSION: v9
1717
LLVM_VERSION: 19
1818
LLVM_TARGZFILE: "https://www.dropbox.com/scl/fi/l9xrfupdbwqbnckr5g36p/llvm_19_1_3_release.tgz?rlkey=xubw01vl6ey3xszbph32xqfip&st=okz2ghqx&dl=1"
19+
GC_VERSION: "8.2.8"
20+
LIBATOMIC_OPS_VERSION: "7.8.2"
1921

2022
jobs:
2123
build:
@@ -81,32 +83,27 @@ jobs:
8183
- name: Download 3rd party source - GC
8284
continue-on-error: true
8385
shell: sh
84-
run: curl --insecure -L https://www.hboehm.info/gc/gc_source/gc-8.0.4.tar.gz --output gc-8.0.4.tar.gz
86+
run: curl --insecure -L https://www.hboehm.info/gc/gc_source/gc-${{ env.GC_VERSION }}.tar.gz --output gc-${{ env.GC_VERSION }}.tar.gz
8587

8688
- name: Download 3rd party source - GC:Atomic_ops
8789
continue-on-error: true
8890
shell: sh
89-
run: curl --insecure -L https://www.hboehm.info/gc/gc_source/libatomic_ops-7.6.10.tar.gz --output libatomic_ops-7.6.10.tar.gz
91+
run: curl --insecure -L https://www.hboehm.info/gc/gc_source/libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz --output libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz
9092

9193
- name: UnZip 3rd party source - GC
9294
continue-on-error: false
9395
shell: sh
94-
run: tar -xvzf gc-8.0.4.tar.gz -C ./3rdParty/
96+
run: tar -xvzf gc-${{ env.GC_VERSION }}.tar.gz -C ./3rdParty/
9597

9698
- name: UnZip 3rd party source - GC:Atomic_ops
9799
continue-on-error: false
98100
shell: sh
99-
run: tar -xvzf libatomic_ops-7.6.10.tar.gz -C ./3rdParty/
101+
run: tar -xvzf libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz -C ./3rdParty/
100102

101103
- name: Copy Atomic_ops to GC
102104
continue-on-error: false
103105
shell: sh
104-
run: cp -a ./3rdParty/libatomic_ops-7.6.10/ ./3rdParty/gc-8.0.4/libatomic_ops/
105-
106-
- name: Copy fixes to GC
107-
continue-on-error: false
108-
shell: sh
109-
run: cp -ar ./docs/fix/gc/* ./3rdParty/gc-8.0.4/
106+
run: cp -a ./3rdParty/libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}/ ./3rdParty/gc-${{ env.GC_VERSION }}/libatomic_ops/
110107

111108
- name: Install Ninja
112109
continue-on-error: false
@@ -122,19 +119,21 @@ jobs:
122119
continue-on-error: false
123120
working-directory: ${{github.workspace}}/__build/gc/ninja/release
124121
shell: sh
125-
run: cmake ../../../../3rdParty/gc-8.0.4 -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=../../../../3rdParty/gc/release -Denable_threads=ON -Denable_cplusplus=OFF
122+
run: cmake ../../../../3rdParty/gc-${{ env.GC_VERSION }} -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/3rdParty/gc/release -DBUILD_SHARED_LIBS=OFF -Denable_threads=ON -Denable_cplusplus=OFF -Denable_docs=OFF
126123

127124
- name: Build GC
128125
continue-on-error: false
129126
working-directory: ${{github.workspace}}/__build/gc/ninja/release
130127
shell: sh
131128
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8
132129

133-
- name: Copy GC
130+
- name: Install GC
134131
continue-on-error: false
135132
working-directory: ${{github.workspace}}/__build/gc/ninja/release
136133
shell: sh
137-
run: mkdir -p ../../../../3rdParty/gc/release/; cp ./lib* ../../../../3rdParty/gc/release/
134+
# Generates the BDWgc CMake package files (lib/cmake/bdwgc/BDWgcConfig.cmake)
135+
# that the tsc build looks up via find_package(BDWgc CONFIG).
136+
run: cmake --install . --config ${{ env.BUILD_TYPE }}
138137

139138
- name: List GC files
140139
continue-on-error: false

.github/workflows/cmake-test-release-win.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@ on:
1313
env:
1414
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
1515
BUILD_TYPE: Release
16-
CACHE_VERSION: v8
16+
CACHE_VERSION: v9
1717
LLVM_VERSION: 19
18-
LLVM_ZIPFILE: "https://www.dropbox.com/scl/fi/xdcj15hlzpod06x4wpls1/llvm_19_1_3_release.zip?rlkey=x38yiyfw3y6bv15z5j3oi84lb&st=bz3u5xkv&dl=1"
18+
LLVM_ZIPFILE: "https://www.dropbox.com/scl/fi/map5fet7x19bm8ztsr4ma/llvm_19_1_3_release_vs2026.zip?rlkey=iwae4mz45lf7nycawa7d61g3r&st=4ee1dfug&dl=1"
19+
GC_VERSION: "8.2.8"
20+
LIBATOMIC_OPS_VERSION: "7.8.2"
1921

2022
jobs:
2123
build:
2224
# The CMake configure and build commands are platform agnostic and should work equally
2325
# well on Windows or Mac. You can convert this to a matrix build if you need
2426
# cross-platform coverage.
2527
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
26-
runs-on: windows-2022
28+
runs-on: windows-latest
2729

2830
steps:
2931
# - name: check disk space
@@ -75,37 +77,32 @@ jobs:
7577
- name: Download 3rd party source - GC
7678
continue-on-error: true
7779
shell: pwsh
78-
run: Invoke-WebRequest -SkipCertificateCheck -Uri "https://www.hboehm.info/gc/gc_source/gc-8.0.4.tar.gz" -OutFile "gc-8.0.4.tar.gz"
80+
run: Invoke-WebRequest -SkipCertificateCheck -Uri "https://www.hboehm.info/gc/gc_source/gc-${{ env.GC_VERSION }}.tar.gz" -OutFile "gc-${{ env.GC_VERSION }}.tar.gz"
7981

8082
- name: Download 3rd party source - GC:Atomic_ops
8183
continue-on-error: true
8284
shell: pwsh
83-
run: Invoke-WebRequest -SkipCertificateCheck -Uri "https://www.hboehm.info/gc/gc_source/libatomic_ops-7.6.10.tar.gz" -OutFile "libatomic_ops-7.6.10.tar.gz"
85+
run: Invoke-WebRequest -SkipCertificateCheck -Uri "https://www.hboehm.info/gc/gc_source/libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz" -OutFile "libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz"
8486

8587
- name: UnZip 3rd party source - GC
8688
continue-on-error: false
87-
run: tar -xvzf gc-8.0.4.tar.gz -C ./3rdParty/
89+
run: tar -xvzf gc-${{ env.GC_VERSION }}.tar.gz -C ./3rdParty/
8890
shell: pwsh
8991

9092
- name: UnZip 3rd party source - GC:Atomic_ops
9193
continue-on-error: false
92-
run: tar -xvzf libatomic_ops-7.6.10.tar.gz -C ./3rdParty/
94+
run: tar -xvzf libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz -C ./3rdParty/
9395
shell: pwsh
9496

9597
- name: Copy Atomic_ops to GC
9698
continue-on-error: false
97-
run: xcopy /E /H /C /I /Y ".\3rdParty\libatomic_ops-7.6.10" ".\3rdParty\gc-8.0.4\libatomic_ops"
98-
shell: pwsh
99-
100-
- name: Copy fixes to GC
101-
continue-on-error: false
102-
run: xcopy /E /H /C /I /Y ".\docs\fix\gc" ".\3rdParty\gc-8.0.4"
99+
run: xcopy /E /H /C /I /Y ".\3rdParty\libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}" ".\3rdParty\gc-${{ env.GC_VERSION }}\libatomic_ops"
103100
shell: pwsh
104101

105102
- name: Configure GC
106103
continue-on-error: false
107104
working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release
108-
run: cmake ../../../../../3rdParty/gc-8.0.4 -G "Visual Studio 17 2022" -A x64 -Wno-dev -Denable_threads=ON -Denable_cplusplus=OFF
105+
run: cmake ../../../../../3rdParty/gc-${{ env.GC_VERSION }} -G "Visual Studio 18 2026" -A x64 -Wno-dev -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/3rdParty/gc/x64/release -DBUILD_SHARED_LIBS=OFF -Denable_threads=ON -Denable_cplusplus=OFF -Denable_docs=OFF -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
109106
shell: pwsh
110107

111108
- name: Build GC
@@ -114,10 +111,12 @@ jobs:
114111
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8
115112
shell: pwsh
116113

117-
- name: Copy GC
114+
- name: Install GC
118115
continue-on-error: false
119116
working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release
120-
run: xcopy /E /H /C /I /Y .\${{ env.BUILD_TYPE }}\ ..\..\..\..\..\3rdParty\gc\x64\release\
117+
# Generates the BDWgc CMake package files (lib/cmake/bdwgc/BDWgcConfig.cmake)
118+
# that the tsc build looks up via find_package(BDWgc CONFIG).
119+
run: cmake --install . --config ${{ env.BUILD_TYPE }}
121120
shell: pwsh
122121

123122
- name: List GC files
@@ -129,7 +128,7 @@ jobs:
129128
- name: Configure
130129
continue-on-error: false
131130
working-directory: ${{github.workspace}}/__build/tsc/msbuild/x64/release
132-
run: cmake ../../../../../tsc -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev
131+
run: cmake ../../../../../tsc -G "Visual Studio 18 2026" -A x64 -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev
133132
shell: pwsh
134133

135134
- name: Build

0 commit comments

Comments
 (0)