diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c721b17ef..a1b167325 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -164,7 +164,7 @@ jobs: fail-fast: false matrix: build_type: [Release, Debug] - llvm_version: [12, 13, 14, 15, 16] + llvm_version: [13, 14, 15, 16] steps: - uses: actions/checkout@v3 @@ -182,10 +182,7 @@ jobs: fi sudo apt-get update sudo apt-get install -y clang-${{matrix.llvm_version}} llvm-${{matrix.llvm_version}} llvm-${{matrix.llvm_version}}-dev lld-${{matrix.llvm_version}} liblld-${{matrix.llvm_version}}-dev - - if [[ "${{matrix.llvm_version}}" > 12 ]]; then - sudo apt-get install -y libmlir-${{matrix.llvm_version}} libmlir-${{matrix.llvm_version}}-dev mlir-${{matrix.llvm_version}}-tools - fi + sudo apt-get install -y libmlir-${{matrix.llvm_version}} libmlir-${{matrix.llvm_version}}-dev mlir-${{matrix.llvm_version}}-tools - name: CMake run: | @@ -251,7 +248,7 @@ jobs: fail-fast: false matrix: build_type: [Release, Debug] - llvm_version: [12, 13, 14] + llvm_version: [13, 14] steps: - uses: actions/checkout@v3 - name: Download LLVM diff --git a/CMakeLists.txt b/CMakeLists.txt index a2e37954c..b2fadeb08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ if(C3_USE_MIMALLOC) endif() if (NOT C3_LLVM_VERSION STREQUAL "auto") - if (${C3_LLVM_VERSION} VERSION_LESS 12 OR ${C3_LLVM_VERSION} VERSION_GREATER 16) + if (${C3_LLVM_VERSION} VERSION_LESS 13 OR ${C3_LLVM_VERSION} VERSION_GREATER 16) message(FATAL_ERROR "LLVM ${C3_LLVM_VERSION} is not supported!") endif() endif() diff --git a/README.md b/README.md index 8678c1593..889464ef5 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,7 @@ You can try it out by running some sample code: `c3c.exe compile ../resources/ex 1. Make sure you have a C compiler that handles C11 and a C++ compiler, such as GCC or Clang. Git also needs to be installed. 2. Install CMake: `sudo apt install cmake` -3. Install LLVM 12 (or greater: C3C supports LLVM 12-16): `sudo apt-get install clang-12 zlib1g zlib1g-dev libllvm12 llvm-12 llvm-12-dev llvm-12-runtime liblld-12-dev liblld-12` +3. Install LLVM 13 (or greater: C3C supports LLVM 13-16): `sudo apt-get install clang-13 zlib1g zlib1g-dev libllvm13 llvm-13 llvm-13-dev llvm-13-runtime liblld-13-dev liblld-13` 4. Clone the C3C github repository: `git clone https://github.com/c3lang/c3c.git` 5. Enter the C3C directory `cd c3c`. 6. Create a build directory `mkdir build` @@ -277,7 +277,7 @@ You can try it out by running some sample code: `./c3c compile ../resources/exam #### Compiling on other Linux / Unix variants 1. Install CMake. -2. Install or compile LLVM and LLD *libraries* (version 12+ or higher) +2. Install or compile LLVM and LLD *libraries* (version 13+ or higher) 3. Clone the C3C github repository: `git clone https://github.com/c3lang/c3c.git` 4. Enter the C3C directory `cd c3c`. 5. Create a build directory `mkdir build` diff --git a/build-with-docker.sh b/build-with-docker.sh index 4fa9c475f..bfc211730 100755 --- a/build-with-docker.sh +++ b/build-with-docker.sh @@ -29,17 +29,14 @@ else fi TAG="$1" -if [ "$1" = 20 ]; then - UBUNTU_VERSION="20.04" - LLVM_VERSION="12" -elif [ "$1" = 21 ]; then +if [ "$1" = 21 ]; then UBUNTU_VERSION="21.10" LLVM_VERSION="13" elif [ "$1" = 22 ]; then UBUNTU_VERSION="22.04" LLVM_VERSION="14" else - echo "ERROR: expected 20, 21 or 22 as Ubuntu version argument" 1>&2 + echo "ERROR: expected 21 or 22 as Ubuntu version argument" 1>&2 exit 2 fi IMAGE="$IMAGE:$TAG" diff --git a/src/build/build_options.c b/src/build/build_options.c index 96d8123da..c2770ae43 100644 --- a/src/build/build_options.c +++ b/src/build/build_options.c @@ -114,7 +114,6 @@ static void usage(void) OUTPUT(" -L - Append the directory to the linker search paths."); OUTPUT(" -z - Send the as a parameter to the linker."); OUTPUT(" --forcelinker - Force built in linker usage when doing non-cross linking."); - OUTPUT(" --newoptimizer - Use new optimizer pipeline."); OUTPUT(""); OUTPUT(" --reloc=