Skip to content

Commit

Permalink
Fix build problem
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesadi committed Dec 31, 2023
1 parent 92f1f26 commit f51e4f8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.20)
project(Pluto)

set(LLVM_ENABLE_PROJECTS "clang;lld" CACHE STRING "")
set(LLVM_TARGETS_TO_BUILD "X86" CACHE STRING "")
set(LLVM_ENABLE_LLD ON CACHE BOOL "")
set(LLVM_INCLUDE_BENCHMARKS OFF CACHE BOOL "")
add_subdirectory(llvm)
6 changes: 1 addition & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
mkdir -p build
cmake -G Ninja -S llvm -B build \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_TARGETS_TO_BUILD="X86" \
-DLLVM_ENABLE_LLD=ON \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
cmake -G Ninja -S . -B build \
-DCMAKE_C_COMPILER="gcc" \
-DCMAKE_CXX_COMPILER="g++" \
-DCMAKE_INSTALL_PREFIX="install" \
Expand Down
2 changes: 1 addition & 1 deletion tests/test-json.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CXX=`pwd`/install/bin/clang++
CXX_FLAGS="-flto -fuse-ld=lld -O3 -mllvm -passes=mba,sub,fla -Xlinker -mllvm -Xlinker -passes=hlw,idc -Wno-unused-command-line-argument"
CXX_FLAGS="-flto -fuse-ld=lld -O3 -mllvm -passes=mba,sub,fla -Xlinker -mllvm -Xlinker -passes=idc -Wno-unused-command-line-argument"

cd tests/json
rm -rf build
Expand Down
2 changes: 1 addition & 1 deletion tests/test-openssl.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cd tests/openssl
CC=../../install/bin/clang CFLAGS="-flto -fuse-ld=lld -O3 -mllvm -passes=mba,sub,bcf,fla -Xlinker -mllvm -Xlinker -passes=hlw,idc -Wno-unused-command-line-argument" ./Configure
CC=../../install/bin/clang CFLAGS="-flto -fuse-ld=lld -O3 -mllvm -passes=mba,sub,bcf,fla -Xlinker -mllvm -Xlinker -passes=idc -Wno-unused-command-line-argument" ./Configure
make -j`nproc` tests

0 comments on commit f51e4f8

Please sign in to comment.