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
Copy file name to clipboardexpand all lines: README.md
+22-3
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,21 @@ listed in the [TypeScript definition file](./llvm-bindings.d.ts).
29
29
30
30
### Install on macOS
31
31
32
+
Make sure `llvm@14` as well as `cmake` are available, e.g. via
32
33
```shell
33
34
# install cmake and llvm by homebrew
34
35
brew install cmake llvm@14
36
+
```
37
+
38
+
Tell the extra build tool used here (`cmake-js`) where to find some cmake-specific integration setup of LLVM 14, then `npm install` the package.
39
+
1. First create the required new file named `.npmrc`
40
+
* alternatively, copy `.npmrc.template` to `.npmrc` and adapt the configured path if needed, `brew --prefix llvm@14` gives you the install dir of LLVM14.
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 [prebuilt LLVM binary](https://github.com/ApsarasX/llvm-windows/releases).
58
72
59
-
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-13.0.1.src\build\lib\cmake\llvm`.
73
+
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-14.0.6.src\build\lib\cmake\llvm`.
60
74
61
75
Finally, execute the following commands.
62
76
63
77
```shell
64
78
# specify the LLVM cmake directory for cmake-js
65
-
npm config set cmake_LLVM_DIR C:\Users\dev\llvm-13.0.1.src\build\lib\cmake\llvm
You can use the npm configuration options to set the path to the LLVM cmake directory. This is needed if you don't want to use the system default LLVM installation.
90
+
(Formerly, `npm config` was used here. Meanwhile npm validates the config keys for being known and valid, and rejects custom keys.)
91
+
75
92
76
93
```shell
77
94
# specify the llvm cmake directory by npm and cmake-js
78
-
npm config set cmake_LLVM_DIR $(path-to-llvm/bin/llvm-config --cmakedir)
95
+
# also see '.npmrc.template' for reference
96
+
# on macos `path-to-llvm` can be obtained via `brew --prefix llvm@14`
0 commit comments