Skip to content

Commit

Permalink
[build] Specify LLVM_MAIN_SRC_DIR when running build-flang.sh
Browse files Browse the repository at this point in the history
Otherwise Classic Flang's CMakeLists.txt will be unable to find llvm-lit and
cannot generate test-related goals, e.g. `check-all`.

Also fix a typo in build-flang.sh that prevented the option from being passed
to CMake correctly.
  • Loading branch information
bryanpkc committed Jul 3, 2023
1 parent 7cc1996 commit a19fb52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_flang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Build and install flang & libpgmath
run: |
${{ env.install_prefix }}/bin/clang --version
./build-flang.sh -t ${{ matrix.target }} -p ${{ env.install_prefix }} -n $(nproc) -c -s -v
./build-flang.sh -t ${{ matrix.target }} -p ${{ env.install_prefix }} -n $(nproc) -c -s -v -l ../../classic-flang-llvm-project/llvm
- name: Copy llvm-lit
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_flang_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Build and install flang & libpgmath
run: |
cd ${{ env.build_path }}/flang
./build-flang.sh -t ${{ matrix.target }} -p ${{ env.install_prefix }} -n `nproc --ignore=1` -v
./build-flang.sh -t ${{ matrix.target }} -p ${{ env.install_prefix }} -n `nproc --ignore=1` -v -l /home/root/classic-flang-llvm-project/llvm
- name: Copy llvm-lit
run: |
Expand Down
4 changes: 2 additions & 2 deletions build-flang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILD_TYPE="Release"
BUILD_PREFIX="./build"
INSTALL_PREFIX="/usr/local"
NPROC=1
USE_LLVM_SRC_ROOT=""
USE_LLVM_MAIN_SRC_DIR=""
USE_LLVM_CONFIG=""
USE_CCACHE="0"
USE_SUDO="0"
Expand Down Expand Up @@ -49,7 +49,7 @@ while getopts "t:d:b:p:n:l:o:csx:v?" opt; do
b) BUILD_PREFIX=$OPTARG;;
p) INSTALL_PREFIX=$OPTARG;;
n) NPROC=$OPTARG;;
l) USE_LLVM_SRC_ROOT="-DLLVM_MAIN_SRC_DIR=$OPTARG";;
l) USE_LLVM_MAIN_SRC_DIR="-DLLVM_MAIN_SRC_DIR=$OPTARG";;
o) USE_LLVM_CONFIG="-DLLVM_CONFIG=$OPTARG";;
c) USE_CCACHE="1";;
s) USE_SUDO="1";;
Expand Down

0 comments on commit a19fb52

Please sign in to comment.