Skip to content

Commit 657996f

Browse files
Add a shared-library version (shintaro-iwasaki#9)
1 parent 8be5c69 commit 657996f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix:
1919
os: [ubuntu-latest]
2020
dist: [local, centos-7, ubuntu-18.04]
21-
config: [release, assert]
21+
config: [release, assert, assert_shared]
2222

2323
exclude:
2424
- os: macos-10.15

build_llvm.bash

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ usage() {
2323
echo "Ex: bash build_llvm.sh -o llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04 -p docker_ubuntu_18.04 -c assert -j 16"
2424
echo "INSTALL_PREFIX = <string> # \${INSTALL_PREFIX}.tar.xz is created"
2525
echo "PLATFORM = {local|docker_ubuntu_18.04|docker_centos7}"
26-
echo "CONFIG = {release|assert|debug}"
26+
echo "CONFIG = {release|assert|debug|assert_shared}"
2727
echo "ARCH = {x86|arm64}"
2828
echo "NUM_JOBS = {1|2|3|...}"
2929
exit 1;
3030
}
3131

32-
while getopts "o:p:c:a:j:" arg; do
32+
while getopts "o:p:c:a:j:s:" arg; do
3333
case "$arg" in
3434
o)
3535
install_prefix="$OPTARG"
@@ -68,6 +68,8 @@ if [ x"$build_config" == x"release" ]; then
6868
CMAKE_CONFIGS="${CMAKE_CONFIGS} -DCMAKE_BUILD_TYPE=Release"
6969
elif [ x"$build_config" == x"assert" ]; then
7070
CMAKE_CONFIGS="${CMAKE_CONFIGS} -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_ENABLE_ASSERTIONS=True"
71+
elif [ x"$build_config" == x"assert_shared" ]; then
72+
CMAKE_CONFIGS="${CMAKE_CONFIGS} -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_ENABLE_ASSERTIONS=True -DLLVM_BUILD_LLVM_DYLIB=1"
7173
elif [ x"$build_config" == x"debug" ]; then
7274
CMAKE_CONFIGS="${CMAKE_CONFIGS} -DCMAKE_BUILD_TYPE=Debug"
7375
else

0 commit comments

Comments
 (0)