Fix the builder script to go with the CI

This commit is contained in:
Sameer Rahmani 2022-06-12 18:07:06 +01:00
parent 8c5804b360
commit 70995c2908
4 changed files with 9 additions and 4 deletions

View File

@ -9,6 +9,7 @@ steps:
- name: Build
image: rg.fr-par.scw.cloud/serene/llvm:15-7
commands:
- cmake --version
- ./builder build
when:
branch:

View File

@ -43,7 +43,6 @@ option(SERENE_SHOW_MLIR_DIALECTS "Print out a list of MLIR dialect libs" OFF)
option(SERENE_SHOW_MLIR_TRANSFORMERS "Print out a list of MLIR dialect transformer libs" OFF)
option(SERENE_SHOW_LLVM_LIBS "Print all the llvm libs available" OFF)
option(SERENE_WITH_MLIR_CL_OPTION "Add support for controlling MLIR via command line options" OFF)

View File

@ -65,7 +65,7 @@ ROOT_DIR=$(pwd)
BUILD_DIR=$ROOT_DIR/build
ME=$(cd "$(dirname "$0")/." >/dev/null 2>&1 ; pwd -P)
CMAKEARGS_DEBUG=" -DCMAKE_BUILD_TYPE=Debug -DSERENE_WITH_MLIR_CL_OPTION=ON"
CMAKEARGS_DEBUG=" -DCMAKE_BUILD_TYPE=Debug"
# Verbose -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
CMAKEARGS=" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSERENE_CCACHE_DIR=$HOME/.ccache"
@ -140,10 +140,15 @@ function compile() { ## Compiles the project using the generated build scripts
}
function build() { ## Builds the project by regenerating the build scripts
local cpus
clean
build-gen "$@"
pushed_build
cmake --build .
cpus=$(grep ^cpu\\scores /proc/cpuinfo | uniq | awk '{print $4}')
cmake --build . -j "$cpus"
popd_build
}

View File

@ -179,7 +179,7 @@ const char *Reader::nextChar(bool skipWhitespace, unsigned count) {
return c;
};
bool Reader::isEndOfBuffer(const char *c) {
bool Reader::isEndOfBuffer(const unsigned char *c) {
return *c == '\0' || currentPos > buf.size() || *c == EOF;
};