diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9e92f75a..9e4a47035 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,7 +54,7 @@ jobs: - name: run compiler tests run: | cd test - python3.exe src/tester.py ..\build\${{ matrix.build_type }}\c3c.exe test_suite/ + python3.exe src/tester.py ..\build\${{ matrix.build_type }}\c3c.exe test_suite2/ - name: Compile run unit tests run: | @@ -177,7 +177,7 @@ jobs: fail-fast: false matrix: build_type: [Release, Debug] - llvm_version: [13, 14, 15, 16] + llvm_version: [13, 15, 16] steps: - uses: actions/checkout@v3 diff --git a/CMakeLists.txt b/CMakeLists.txt index 73f4f29af..3c886d505 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,11 +57,11 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC") endif() FetchContent_Declare( LLVM_Windows - URL https://github.com/c3lang/win-llvm/releases/download/llvm1406/llvm-14.0.6-windows-amd64-msvc17-libcmt.7z + URL https://github.com/c3lang/win-llvm/releases/download/llvm_15_0_6/llvm-15.0.6-windows-amd64-msvc17-libcmt.7z ) FetchContent_Declare( LLVM_Windows_debug - URL https://github.com/c3lang/win-llvm/releases/download/llvm1406/llvm-14.0.6-windows-amd64-msvc17-libcmt-dbg.7z + URL https://github.com/c3lang/win-llvm/releases/download/llvm_15_0_6/llvm-15.0.6-windows-amd64-msvc17-libcmt-dbg.7z ) if(CMAKE_BUILD_TYPE STREQUAL "Debug") message("Loading Windows LLVM debug libraries, this may take a while...") diff --git a/CODESTYLE.md b/CODESTYLE.md index 41f7986d5..f82e0ec42 100644 --- a/CODESTYLE.md +++ b/CODESTYLE.md @@ -116,7 +116,8 @@ more tests as you go along. ### Don't bring in dependencies External libraries has maintainability issues. Try to depend on as few libraries -as possible. Currently c3c only depends on LLVM and libc. +as possible. Currently, c3c only depends on LLVM and libc with an optional +dependency on libcurl. Do use rewrites of subsets of other libraries to bring in functionality, but avoid copying in libraries that needs to be updated separately. diff --git a/README.md b/README.md index 438893dd1..67b9974ce 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Precompiled binaries for the following operating systems are available: - Windows x64 [download](https://github.com/c3lang/c3c/releases/download/latest/c3-windows.zip), [install instructions](#installing-on-windows-with-precompiled-binaries). - Debian x64 [download](https://github.com/c3lang/c3c/releases/download/latest/c3-linux.tar.gz), [install instructions](#installing-on-debian-with-precompiled-binaries). -- MacOS x64 [download](https://github.com/c3lang/c3c/releases/download/untagged-6fcf1b0c7b17361947ce/c3-macos.zip), [install instructions](#installing-on-mac-with-precompiled-binaries). +- MacOS x64 [download](https://github.com/c3lang/c3c/releases/download/latest/c3-macos.zip), [install instructions](#installing-on-mac-with-precompiled-binaries). The manual for C3 can be found at [www.c3-lang.org](http://www.c3-lang.org). @@ -211,7 +211,7 @@ A `c3c` executable will be found under `bin/`. #### Installing on OS X using Homebrew 2. Install CMake: `brew install cmake` -3. Install LLVM 13: `brew install llvm` +3. Install LLVM 15: `brew install llvm` 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` @@ -266,7 +266,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 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` +3. Install LLVM 15 (or greater: C3C supports LLVM 13-16): `sudo apt-get install clang-15 zlib1g zlib1g-dev libllvm15 llvm-15 llvm-15-dev llvm-15-runtime liblld-15-dev liblld-15` 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` @@ -282,7 +282,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 13+ or higher) +2. Install or compile LLVM and LLD *libraries* (version 15+ 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 bfc211730..6ea8ab065 100755 --- a/build-with-docker.sh +++ b/build-with-docker.sh @@ -2,12 +2,12 @@ ## build-with-docker.sh ## @author gdm85 ## -## Script to build c3c for either Ubuntu 20, 21 or 22. +## Script to build c3c for either Ubuntu 21 or 22. ## # if [ $# -ne 1 -a $# -ne 2 ]; then - echo "Usage: build-with-docker.sh (20|21|22) [Debug|Release]" 1>&2 + echo "Usage: build-with-docker.sh (21|22) [Debug|Release]" 1>&2 exit 1 fi @@ -35,8 +35,11 @@ if [ "$1" = 21 ]; then elif [ "$1" = 22 ]; then UBUNTU_VERSION="22.04" LLVM_VERSION="14" +elif [ "$1" = 22 ]; then + UBUNTU_VERSION="23.04" + LLVM_VERSION="15" else - echo "ERROR: expected 21 or 22 as Ubuntu version argument" 1>&2 + echo "ERROR: expected 21, 22 or 23 as Ubuntu version argument" 1>&2 exit 2 fi IMAGE="$IMAGE:$TAG"