Compare commits

...

15 Commits

Author SHA1 Message Date
William Bell
f9f8ca08c6 fix bug for windows 2025-08-16 00:50:23 +01:00
William Bell
0666b02c13 fix flex tool 2025-08-16 00:44:00 +01:00
William Bell
1654507835 fix for windows 2025-08-16 00:42:13 +01:00
William Bell
d054ece8e2 release 2025-08-16 00:39:37 +01:00
William Bell
4937942d6e fix release 2025-08-16 00:35:48 +01:00
William Bell
82ea92183f fix release 2025-08-16 00:28:08 +01:00
William Bell
5fb15b476f fix release 2025-08-16 00:26:26 +01:00
William Bell
d1a455dbbe fix release.yml 2025-08-16 00:07:10 +01:00
William Bell
a81640747d fix release.yml 2025-08-15 22:07:25 +01:00
William Bell
4a1ed23f96 fix release.yml 2025-08-15 22:05:57 +01:00
William Bell
eb36d02fcb fix release.yml 2025-08-15 22:03:23 +01:00
William Bell
7b3a1e1835 fix release.yml 2025-08-15 21:52:16 +01:00
William Bell
8e53579682 fix release.yml 2025-08-15 21:36:51 +01:00
William Bell
0d8f262185 this thing is really annoying me now 2025-08-15 21:34:31 +01:00
William Bell
fc6f41d89b fix release.yml 2025-08-15 21:30:01 +01:00
4 changed files with 32 additions and 35 deletions

View File

@@ -100,32 +100,29 @@ jobs:
build-windows: build-windows:
runs-on: windows-latest runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
submodules: recursive submodules: recursive
- name: Install build tools - uses: msys2/setup-msys2@v2
run: choco install winflexbison -y
shell: pwsh
- name: Setup Python
uses: actions/setup-python@v4
with: with:
python-version: '3.x' msystem: MINGW64
update: true
install: >
base-devel
mingw-w64-x86_64-gcc
mingw-w64-x86_64-make
mingw-w64-x86_64-gmp
mingw-w64-x86_64-gc
- name: Install Conan - name: Build Project
run: | run: |
python -m pip install --upgrade pip make windows
pip install conan
conan profile detect
shell: pwsh
- name: Build with MinGW
run: |
conan install .
conan build .
shell: pwsh
- name: Package - name: Package
run: | run: |
@@ -133,7 +130,7 @@ jobs:
$ARCH = if ([Environment]::Is64BitOperatingSystem) { 'x64' } else { 'x86' } $ARCH = if ([Environment]::Is64BitOperatingSystem) { 'x64' } else { 'x86' }
$FOLDER = "chloride-$TAG-windows-$ARCH" $FOLDER = "chloride-$TAG-windows-$ARCH"
$ZIP = "$FOLDER.zip" $ZIP = "$FOLDER.zip"
Rename-Item build\bin $FOLDER Rename-Item bin $FOLDER
Copy-Item LICENSE.txt $FOLDER Copy-Item LICENSE.txt $FOLDER
Compress-Archive -Path $FOLDER -DestinationPath $ZIP Compress-Archive -Path $FOLDER -DestinationPath $ZIP
echo "TAR_NAME=$ZIP" >> $env:GITHUB_ENV echo "TAR_NAME=$ZIP" >> $env:GITHUB_ENV

View File

@@ -51,17 +51,7 @@ set_target_properties(argon PROPERTIES
find_package(BDWgc REQUIRED) find_package(BDWgc REQUIRED)
find_package(gmp REQUIRED) find_package(gmp REQUIRED)
target_compile_options(argon PRIVATE -O3 -Wall -s) target_compile_options(argon PRIVATE -O3 -Wall -Wextra -Wno-unused-function -s)
if(MSVC)
# Disable warning C4061 (enum in switch not handled)
target_compile_options(argon PRIVATE /wd4061)
# Disable Spectre mitigation warning C5045
target_compile_options(argon PRIVATE /wd5045)
# Optionally, remove "treat warnings as errors" if enabled
# target_compile_options(argon PRIVATE /WX-) # uncomment if you previously used /WX
endif()
if(NOT APPLE) if(NOT APPLE)
target_link_options(argon PRIVATE -static) target_link_options(argon PRIVATE -static)
endif() endif()

View File

@@ -2,23 +2,32 @@
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# Default FLEX tool
BINARY = bin/argon
FLEX_TOOL = flex
CFILES = external/xxhash/xxhash.c external/cwalk/src/cwalk.c external/libdye/src/dye.c $(shell find src -name '*.c')
LEXER_SRC = src/lexer/lex.l LEXER_SRC = src/lexer/lex.l
LEXER_C = src/lexer/lex.yy.c LEXER_C = src/lexer/lex.yy.c
LEXER_H = src/lexer/lex.yy.h LEXER_H = src/lexer/lex.yy.h
CFILES = external/xxhash/xxhash.c external/cwalk/src/cwalk.c external/libdye/src/dye.c $(shell find src -name '*.c')
CFLAGS = $(ARCHFLAGS) -lm -lgc -lgmp -Wall -Wextra -Wno-unused-function -Werror=unused-result -Iexternal/cwalk/include -Iexternal/libdye/include CFLAGS = $(ARCHFLAGS) -lm -lgc -lgmp -Wall -Wextra -Wno-unused-function -Werror=unused-result -Iexternal/cwalk/include -Iexternal/libdye/include
BINARY = bin/argon
all: $(BINARY) all: $(BINARY)
$(LEXER_C) $(LEXER_H): $(LEXER_SRC) $(LEXER_C) $(LEXER_H): $(LEXER_SRC)
flex --header-file=$(LEXER_H) -o $(LEXER_C) $(LEXER_SRC) $(FLEX_TOOL) --header-file=$(LEXER_H) -o $(LEXER_C) $(LEXER_SRC)
$(BINARY): $(CFILES) $(LEXER_C) $(LEXER_H) $(BINARY): $(CFILES) $(LEXER_C) $(LEXER_H)
mkdir -p bin mkdir -p bin
gcc -O3 -o $(BINARY) $(CFILES) $(CFLAGS) -s gcc -O3 -o $(BINARY) $(CFILES) $(CFLAGS) -s
windows: $(CFILES) $(LEXER_C) $(LEXER_H)
find external/xxhash external/cwalk external/libdye src -name '*.c' > sources.txt
mkdir -p bin
gcc -O3 -march=native -o $(BINARY) @sources.txt $(CFLAGS)
native: $(CFILES) $(LEXER_C) $(LEXER_H) native: $(CFILES) $(LEXER_C) $(LEXER_H)
mkdir -p bin mkdir -p bin
gcc -O3 -march=native -o $(BINARY) $(CFILES) $(CFLAGS) gcc -O3 -march=native -o $(BINARY) $(CFILES) $(CFLAGS)

View File

@@ -16,8 +16,9 @@
#include <string.h> #include <string.h>
#if defined(_WIN32) #if defined(_WIN32)
#include <psapi.h> #define _WIN32_WINNT 0x0602
#include <windows.h> #include <windows.h>
#include <psapi.h>
double get_memory_usage_mb() { double get_memory_usage_mb() {
PROCESS_MEMORY_COUNTERS pmc; PROCESS_MEMORY_COUNTERS pmc;