Skip to content

Instantly share code, notes, and snippets.

@myfreeer
Last active May 29, 2017 05:41
Show Gist options
  • Save myfreeer/c8df0b2acbf97e8b391ca741e5248f3f to your computer and use it in GitHub Desktop.
Save myfreeer/c8df0b2acbf97e8b391ca741e5248f3f to your computer and use it in GitHub Desktop.
Tiny C Compiler build scripts on msys2
version: 1.0.{build}
build_script:
- cmd: >-
C:\msys64\usr\bin\pacman -Syyuu --noconfirm
C:\msys64\usr\bin\pacman -Suu --noconfirm
appveyor DownloadFile https://gist.github.com/myfreeer/c8df0b2acbf97e8b391ca741e5248f3f/raw/tinycc-build.sh
set MSYSTEM=MINGW64
C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./tinycc-build.sh"
cd build-tcc
set filename=tcc_x64.7z
7z a -mx9 %filename% * -r
appveyor PushArtifact %filename%
cd ..
rd /s /q build-tcc
C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec make clean"
set MSYSTEM=MINGW32
C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./tinycc-build.sh"
cd build-tcc
set filename=tcc_x86.7z
7z a -mx9 %filename% * -r
appveyor PushArtifact %filename%
test: off
#!/bin/sh
CPUCOUNT=$(grep -c ^processor /proc/cpuinfo)
case $MSYSTEM in
MINGW32)
export CPU=x86
;;
MINGW64)
export CPU=x86_64
;;
esac
# build tcc using gcc
mkdir build-tcc-gcc
./configure --prefix=./build-tcc-gcc --strip-binaries --cpu=$CPU
make -j$CPUCOUNT && make install
# build tcc using tcc
make clean
mkdir build-tcc
./configure --prefix=./build-tcc --cc=./build-tcc-gcc/tcc --strip-binaries --extra-cflags="" --extra-ldflags="" --cpu=$CPU
make -j$CPUCOUNT && make install
@myfreeer
Copy link
Author

myfreeer commented May 13, 2017

Readme

Tiny C Compiler build scripts on msys2

Build Status

Build status

Artifacts

  • x86_64 (64-bits) version: tcc_x64.7z
  • x86 (32-bits) version: tcc_x86.7z

Credits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment