Compare commits
11 Commits
prerelease
...
prerelease
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5277814af0 | ||
|
|
8928ab2d99 | ||
|
|
d08b307c6e | ||
|
|
6474329afc | ||
|
|
c49e67c839 | ||
|
|
25cb96e473 | ||
|
|
f11890a8b3 | ||
|
|
59b1d222c2 | ||
|
|
2fba132016 | ||
|
|
bddc2cdc79 | ||
|
|
e1b80b42d9 |
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@@ -117,12 +117,21 @@ jobs:
|
||||
base-devel
|
||||
mingw-w64-x86_64-gcc
|
||||
mingw-w64-x86_64-make
|
||||
mingw-w64-x86_64-gmp
|
||||
mingw-w64-x86_64-gc
|
||||
mingw-w64-x86_64-cmake
|
||||
mingw-w64-x86_64-python
|
||||
mingw-w64-x86_64-python-pip
|
||||
mingw-w64-x86_64-flex
|
||||
|
||||
- name: Install Conan
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install conan
|
||||
conan profile detect
|
||||
|
||||
- name: Build Project
|
||||
run: |
|
||||
make windows
|
||||
conan install . --profile mingw-profile.txt --build=missing
|
||||
conan build .
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
@@ -130,7 +139,7 @@ jobs:
|
||||
$ARCH = if ([Environment]::Is64BitOperatingSystem) { 'x64' } else { 'x86' }
|
||||
$FOLDER = "chloride-$TAG-windows-$ARCH"
|
||||
$ZIP = "$FOLDER.zip"
|
||||
Rename-Item bin $FOLDER
|
||||
Rename-Item build/bin $FOLDER
|
||||
Copy-Item LICENSE.txt $FOLDER
|
||||
Compress-Archive -Path $FOLDER -DestinationPath $ZIP
|
||||
echo "TAR_NAME=$ZIP" >> $env:GITHUB_ENV
|
||||
@@ -150,6 +159,7 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: ./artifacts
|
||||
merge-multiple: true
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: ncipollo/release-action@v1
|
||||
|
||||
@@ -52,9 +52,6 @@ find_package(BDWgc REQUIRED)
|
||||
find_package(gmp REQUIRED)
|
||||
|
||||
target_compile_options(argon PRIVATE -O3 -Wall -Wextra -Wno-unused-function -s)
|
||||
if(NOT APPLE)
|
||||
target_link_options(argon PRIVATE -static)
|
||||
endif()
|
||||
|
||||
target_link_libraries(argon PRIVATE
|
||||
BDWgc::BDWgc
|
||||
|
||||
15
Makefile
15
Makefile
@@ -12,6 +12,11 @@ LEXER_SRC = src/lexer/lex.l
|
||||
LEXER_C = src/lexer/lex.yy.c
|
||||
LEXER_H = src/lexer/lex.yy.h
|
||||
CFLAGS = $(ARCHFLAGS) -lm -lgc -lgmp -Wall -Wextra -Wno-unused-function -Werror=unused-result -Iexternal/cwalk/include -Iexternal/libdye/include
|
||||
LDFLAGS = -lgc -lgmp -lm
|
||||
|
||||
ifeq ($(MAKECMDGOALS),windows)
|
||||
LDFLAGS = -Wl,-Bstatic -lgc -lgmp -Wl,-Bdynamic -lm
|
||||
endif
|
||||
|
||||
all: $(BINARY)
|
||||
|
||||
@@ -21,7 +26,7 @@ $(LEXER_C) $(LEXER_H): $(LEXER_SRC)
|
||||
|
||||
$(BINARY): $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||
mkdir -p bin
|
||||
gcc -O3 -o $(BINARY) $(CFILES) $(CFLAGS) -s
|
||||
gcc -O3 -o $(BINARY) $(CFILES) $(CFLAGS) ${LDFLAGS} -s
|
||||
|
||||
windows: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||
(echo -n "external/xxhash/xxhash.c " ; \
|
||||
@@ -33,7 +38,7 @@ windows: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||
|
||||
native: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||
mkdir -p bin
|
||||
gcc -O3 -march=native -o $(BINARY) $(CFILES) $(CFLAGS)
|
||||
gcc -O3 -march=native -o $(BINARY) $(CFILES) $(CFLAGS) ${LDFLAGS}
|
||||
|
||||
debug: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||
mkdir -p bin
|
||||
@@ -41,13 +46,13 @@ debug: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||
|
||||
full-debug: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||
mkdir -p bin
|
||||
gcc -g -O0 -fsanitize=address -fno-omit-frame-pointer -o $(BINARY) $(CFILES) $(CFLAGS)
|
||||
gcc -g -O0 -fsanitize=address -fno-omit-frame-pointer -o $(BINARY) $(CFILES) $(CFLAGS) ${LDFLAGS}
|
||||
|
||||
optimised: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||
mkdir -p bin
|
||||
gcc -O3 -fprofile-generate -o $(BINARY) $(CFILES) $(CFLAGS)
|
||||
gcc -O3 -fprofile-generate -o $(BINARY) $(CFILES) $(CFLAGS) ${LDFLAGS}
|
||||
${BINARY} rand_test.ar
|
||||
gcc -O3 -fprofile-use -o $(BINARY) $(CFILES) $(CFLAGS)
|
||||
gcc -O3 -fprofile-use -o $(BINARY) $(CFILES) $(CFLAGS) ${LDFLAGS}
|
||||
|
||||
|
||||
clean:
|
||||
|
||||
13
conanfile.py
13
conanfile.py
@@ -33,16 +33,11 @@ class ArgonConan(ConanFile):
|
||||
os.environ["CONAN_NON_INTERACTIVE"] = "1"
|
||||
tc = CMakeToolchain(self)
|
||||
|
||||
if os.name == "nt": # Windows
|
||||
flex_path = which("win_flex") or which("win_flex.exe")
|
||||
if not flex_path:
|
||||
raise Exception("win_flex not found in PATH. Install winflexbison via choco.")
|
||||
else:
|
||||
flex_path = which("flex")
|
||||
if not flex_path:
|
||||
raise Exception("Flex not found in system PATH. Please install flex on Linux/macOS.")
|
||||
flex_path = which("flex")
|
||||
if not flex_path:
|
||||
raise Exception("Flex not found in system PATH. Please install flex on Linux/macOS.")
|
||||
|
||||
tc.variables["FLEX_EXECUTABLE"] = flex_path.replace("\\", "\\\\")
|
||||
tc.variables["FLEX_EXECUTABLE"] = flex_path
|
||||
tc.generate()
|
||||
|
||||
def build(self):
|
||||
|
||||
12
mingw-profile.txt
Normal file
12
mingw-profile.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
[settings]
|
||||
os=Windows
|
||||
compiler=gcc
|
||||
compiler.version=12
|
||||
compiler.libcxx=libstdc++11
|
||||
compiler.threads=posix
|
||||
compiler.exception=seh
|
||||
arch=x86_64
|
||||
build_type=Release
|
||||
|
||||
[tool_requires]
|
||||
mingw-builds/12.2.0
|
||||
Reference in New Issue
Block a user