-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathenv.sh
34 lines (30 loc) · 943 Bytes
/
env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
#
# It sets the LLVM environment variables.
#
# You can copy this file to .envrc/.env and adapt it for your environment.
# This line will ensure that the script can be used from any directory, not just
# the project's root.
ROOT_DIR="$(realpath $(dirname "${BASH_SOURCE[0]}"))"
case $(uname) in
Darwin)
# If installed with brew
LIBRARY_PATH=/opt/homebrew/lib
MLIR_SYS_190_PREFIX="$(brew --prefix llvm@19)"
LLVM_SYS_191_PREFIX="$(brew --prefix llvm@19)"
TABLEGEN_190_PREFIX="$(brew --prefix llvm@19)"
export LIBRARY_PATH
export MLIR_SYS_190_PREFIX
export LLVM_SYS_191_PREFIX
export TABLEGEN_190_PREFIX
;;
Linux)
# If installed from Debian/Ubuntu repository:
MLIR_SYS_190_PREFIX=/usr/lib/llvm-19
LLVM_SYS_191_PREFIX=/usr/lib/llvm-19
TABLEGEN_190_PREFIX=/usr/lib/llvm-19
export MLIR_SYS_190_PREFIX
export LLVM_SYS_191_PREFIX
export TABLEGEN_190_PREFIX
;;
esac