Last active
May 29, 2017 05:41
-
-
Save myfreeer/c8df0b2acbf97e8b391ca741e5248f3f to your computer and use it in GitHub Desktop.
Tiny C Compiler build scripts on msys2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Readme
Tiny C Compiler build scripts on msys2
Build Status
Artifacts
Credits