You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- No breaking JavaScript/TypeScript API surface changes.
9
+
- Internal binding update for debug-info language representation.
10
+
- Minimum supported LLVM version raised to 22.
11
+
12
+
### Changed
13
+
14
+
-`DIBuilder.createCompileUnit` now calls `llvm::DISourceLanguageName(lang)` instead of a raw `dwarf::SourceLanguage` cast, matching the LLVM 22 API. The JavaScript/TypeScript signature is unchanged (still accepts a number).
15
+
- Removed the `#if LLVM_VERSION_MAJOR >= 22` / `#else` conditional in `DIBuilder.cpp`; only the LLVM 22+ code path is retained.
16
+
-`cmake/LLVM.cmake` version-discovery loop and minimum-version guard updated to require LLVM >= 22.
Copy file name to clipboardExpand all lines: README.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ listed in the [TypeScript definition file](./llvm-bindings.d.ts).
28
28
29
29
```shell
30
30
# install cmake and llvm by homebrew
31
-
brew install cmake llvm@21
31
+
brew install cmake llvm@22
32
32
33
33
# install llvm-bindings by yarn
34
34
yarn add llvm-bindings
@@ -40,7 +40,7 @@ yarn add llvm-bindings
40
40
#install llvm by installation script
41
41
wget https://apt.llvm.org/llvm.sh
42
42
sudo chmod +x llvm.sh
43
-
sudo ./llvm.sh 21
43
+
sudo ./llvm.sh 22
44
44
45
45
# install cmake and zlib by apt-get
46
46
sudo apt-get install cmake zlib1g-dev
@@ -51,17 +51,17 @@ yarn add llvm-bindings
51
51
52
52
### Install on Windows
53
53
54
-
First, please refer to [Build LLVM from sources on Windows 10](https://github.com/ApsarasX/llvm-bindings/wiki/Build-LLVM-from-source-code-on-Windows-10) to build LLVM. An alternative is to download a prebuilt LLVM 21 binary for Windows.
54
+
First, please refer to [Build LLVM from sources on Windows 10](https://github.com/ApsarasX/llvm-bindings/wiki/Build-LLVM-from-source-code-on-Windows-10) to build LLVM. An alternative is to download a prebuilt LLVM 22 binary for Windows.
55
55
56
-
Then, find the `llvm-config` command in your LLVM build directory and execute `llvm-config --cmakedir` to get LLVM cmake directory, assuming `C:\Users\dev\LLVM-21.x.x-win64\lib\cmake\llvm`.
56
+
Then, find the `llvm-config` command in your LLVM build directory and execute `llvm-config --cmakedir` to get LLVM cmake directory, assuming `C:\Users\dev\LLVM-22.x.x-win64\lib\cmake\llvm`.
57
57
58
58
Finally, execute the following commands.
59
59
60
60
```shell
61
61
# specify the LLVM cmake directory for cmake-js
62
62
# note: cmake-js reads npm-style config keys
63
63
# on Windows PowerShell, prefer env var over npm config set
@@ -243,6 +243,21 @@ LLVM 21 introduces binding-level API updates in this project:
243
243
- Replace usages of `Attribute.AttrKind.NoCapture` with LLVM 21-compatible attribute construction.
244
244
- For atomic RMW creation, use `IRBuilder.CreateAtomicRMW(op, ptr, val, align, ordering)` with `op` from `AtomicRMWInst.BinOp`.
245
245
246
+
## LLVM 22 / v9.0.x
247
+
248
+
LLVM 22 introduces a source-language naming API change in debug info and bumps the minimum supported version.
249
+
250
+
**At a glance**
251
+
252
+
- No breaking JavaScript/TypeScript API surface changes.
253
+
-`DIBuilder.createCompileUnit` internally now uses `DISourceLanguageName()` to wrap the language code (LLVM 22 replaced the raw `dwarf::SourceLanguage` cast).
254
+
- Minimum required LLVM version is now 22; older LLVM versions are no longer supported.
255
+
256
+
**Internal changes (no JS/TS impact)**
257
+
258
+
-`DIBuilder.cpp`: removed the `#if LLVM_VERSION_MAJOR >= 22` conditional; the LLVM 22+ API is now the only code path.
259
+
-`cmake/LLVM.cmake`: the version discovery loop and the minimum-version guard now enforce LLVM >= 22.
0 commit comments