Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
89688b2
CI(macOS): Set up compilation for ASAN (Address Sanitizer)
echoix Jun 23, 2025
17f0feb
Use folded and block chomping for multiline env var
echoix Jun 23, 2025
74681c4
Update macos_install.sh
echoix Jun 23, 2025
3240281
CI(macOS): Run script directly, without sourcing it
echoix Jun 23, 2025
ebc2d6e
Update macos_install.sh to use bash shebang
echoix Jun 23, 2025
579f126
Call bash
echoix Jun 23, 2025
2b6cb01
Update macos_install.sh debug makecmd
echoix Jun 23, 2025
ff63e5d
Update macos.yml remove deprecated-declarations error
echoix Jun 23, 2025
1c0e6ea
Update macos.yml
echoix Jun 23, 2025
aadb4c4
Update macos.yml -Wno-error=deprecated-declarations
echoix Jun 23, 2025
f64154a
Update macos.yml -Wdeprecated-declarations
echoix Jun 23, 2025
77a8fd1
Update macos.yml --no-keep-going
echoix Jun 23, 2025
437e1b6
Update macos.yml use -static-libasan for linker
echoix Jun 23, 2025
79210b0
Update macos.yml -shared-libsan, as -static-libasan isn’t available o…
echoix Jun 23, 2025
cdabb48
Update macos.yml remove shared libsan linker flag
echoix Jun 23, 2025
db21a67
Update macos.yml add color with -fcolor-diagnostics
echoix Jun 23, 2025
ab72462
Update macos_install.sh typo
echoix Jun 23, 2025
ecc8e39
Update macos.yml verbose linker flags
echoix Jun 23, 2025
d12084a
Comment out most added flags
echoix Jun 25, 2025
4104599
Add debug flag -g
echoix Jun 25, 2025
7312a0f
Update macos.yml
echoix Jun 25, 2025
01c53f8
Merge branch 'main' into macOS-asan
echoix Jun 25, 2025
c83b0dd
Remove debug flag
echoix Jun 25, 2025
98c3152
Remove bash call
echoix Jun 25, 2025
03049e8
Update macos_install.sh add env vars to flags
echoix Jun 25, 2025
09ed305
Update macos.yml
echoix Jun 25, 2025
955f90c
Update macos_install.sh shebang /bin/sh
echoix Jun 25, 2025
fb1b3db
Update macos.yml comment out make flags
echoix Jun 25, 2025
30b04b2
set -x, run normal make, with flags
echoix Jun 25, 2025
4780fb2
Update macos_install.sh G_LDFLAGS_APPEND at configure
echoix Jun 25, 2025
6842193
Update macos_install.sh make args double quoted
echoix Jun 25, 2025
6a1199b
Update macos_install.sh use makecmd
echoix Jun 25, 2025
cabed6c
Update macos.yml enable flags
echoix Jun 25, 2025
d7dea53
Update macos_install.sh use makecmd without LDFLAGS, but LDFLAGS on c…
echoix Jun 25, 2025
11ff56d
Update macos.yml remove verbose linker flag
echoix Jun 25, 2025
6c2ec4e
Update macos.yml comment recover all
echoix Jun 25, 2025
31d555a
Update macos.yml move comment
echoix Jun 25, 2025
db10ef6
Update macos.yml comment out recover
echoix Jun 25, 2025
db649b5
Update macos.yml show llvm-symbolizer
echoix Jun 25, 2025
1037692
Update macos.yml llvm-symbolizer-20
echoix Jun 25, 2025
7d6cdaa
Update conda-requirements-dev-arm64.txt add llvm-tools
echoix Jun 25, 2025
ffcc4eb
Update macos.yml
echoix Jun 25, 2025
b858891
Update macos.yml
echoix Jun 25, 2025
28e9235
Update conda-requirements-dev-arm64.txt add llvm
echoix Jun 25, 2025
b23d047
Update macos.yml typo llvm-symbolizer
echoix Jun 25, 2025
8573a57
Update macos_install.sh remove set -x that showed the commands that ran
echoix Jun 25, 2025
f5fb94b
Update conda-requirements-dev-arm64.txt remove llvm
echoix Jun 25, 2025
0ceb0e2
Update macos.yml detect leaks and odr
echoix Jun 25, 2025
86d278d
Update macos.yml detect leaks on compilation
echoix Jun 25, 2025
ed32363
Update macos.yml
echoix Jun 25, 2025
6e5683d
Update conda-requirements-dev-arm64.txt comment out llvm-tools
echoix Jun 26, 2025
30fd77b
Update conda-requirements-dev-arm64.txt remove llvm-tools
echoix Jun 26, 2025
c9f50df
Merge branch 'main' into macOS-asan
echoix Jun 26, 2025
17f52f8
Clean up macos.yml
echoix Jun 26, 2025
0d0be0a
Update macos.yml add comment on llvm-symbolizer
echoix Jun 26, 2025
791c4a1
Update macos.yml add $G_CFLAGS_APPEND to source command
echoix Jun 26, 2025
9b63f6e
Update ctypesgen Makefile to add libclang_rt for interceptors to work
echoix Jun 26, 2025
8cffccc
Merge branch 'main' into macOS-asan
echoix Jun 26, 2025
29873e2
Merge branch 'main' into macOS-asan
echoix Jun 26, 2025
43de0fe
Update macos.yml compile with env DYLD_INSERT_LIBRARIES=/Users/runner…
echoix Jun 26, 2025
72702f4
Merge branch 'main' into macOS-asan
echoix Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
runs-on: macos-14
env:
PYTHONWARNINGS: always
ASAN_OPTIONS: detect_leaks=1,detect_odr_violation=1
steps:
- name: Info
run: |
Expand Down Expand Up @@ -80,9 +81,34 @@ jobs:
$CC --version
- name: Create installation directory
run: mkdir $HOME/install
- name: Show clang path
shell: micromamba-shell {0}
run: which clang
# llvm-symbolizer, if on path or specified with ASAN_SYMBOLIZER_PATH,
# enhances tracebacks with line numbers instead of addresses
- name: Show llvm-symbolizer
shell: micromamba-shell {0}
run: which llvm-symbolizer
# Commented below are some possible flags to pass to not exit on failures
- name: Build and install
shell: micromamba-shell {0}
run: source ./.github/workflows/macos_install.sh $HOME/install
run: source ./.github/workflows/macos_install.sh $HOME/install $G_CFLAGS_APPEND
env:
G_CFLAGS_APPEND: >-
-g
-fcolor-diagnostics
-fno-omit-frame-pointer
-fsanitize=address
-Wno-error=deprecated-declarations
-Wdeprecated-declarations
# -fsanitize-recover=address
# -fsanitize-recover=all
G_LDFLAGS_APPEND: >-
-fno-omit-frame-pointer
-fsanitize=address
# -fsanitize-recover=address
ASAN_OPTIONS: detect_leaks=0,detect_odr_violation=1
DYLD_INSERT_LIBRARIES: /Users/runner/micromamba/envs/grass-env/lib/clang/20/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
- name: Add the bin directory to PATH
run: echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Check installed version
Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/macos_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,27 @@ export CFLAGS="-O2 -pipe -ffp-contract=off -arch ${CONDA_ARCH} -DGL_SILENCE_DEPR
export CXXFLAGS="-O2 -pipe -ffp-contract=off -stdlib=libc++ -arch ${CONDA_ARCH} -Wall -Wextra -Wpedantic"
export CPPFLAGS="-isystem${CONDA_PREFIX}/include"

./configure $CONFIGURE_FLAGS
LDFLAGS="$LDFLAGS $G_LDFLAGS_APPEND" ./configure $CONFIGURE_FLAGS

EXEMPT=""
make -j$(sysctl -n hw.ncpu) CFLAGS="$CFLAGS -Werror $EXEMPT" \
CXXFLAGS="$CXXFLAGS -Werror $EXEMPT"

# Adding -Werror to make's CFLAGS is a workaround for configuring with
# an old version of configure, which issues compiler warnings and
# errors out. This may be removed with upgraded configure.in file.
#makecmd="make"
#makecmd="make -j$(sysctl -n hw.ncpu) CFLAGS='$CFLAGS -Werror $EXEMPT' CXXFLAGS='$CXXFLAGS -Werror $EXEMPT' LDFLAGS='$LDFLAGS $G_LDFLAGS_APPEND'"
makecmd="make -j$(sysctl -n hw.ncpu) CFLAGS='$CFLAGS -Werror $EXEMPT' CXXFLAGS='$CXXFLAGS -Werror $EXEMPT'"

#echo "Running normal make, with flags"
#make -j$(sysctl -n hw.ncpu) CFLAGS="$CFLAGS -Werror $EXEMPT" CXXFLAGS="$CXXFLAGS -Werror $EXEMPT"

echo "before extra args"
if [[ "$#" -ge 2 ]]; then
ARGS=("$@")
echo "in extra args"
makecmd="make -j$(sysctl -n hw.ncpu) CFLAGS='$CFLAGS -Werror ${ARGS[@]:1} $EXEMPT' CXXFLAGS='$CXXFLAGS -Werror ${ARGS[@]:1} $EXEMPT'"
fi

echo "The make command is: $makecmd"
eval $makecmd
make install
2 changes: 1 addition & 1 deletion python/libgrass_interface_generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ifneq ($(MINGW),)
INTLLIB = -lintl-8
endif

CTYPESGEN = ./run.py
CTYPESGEN = DYLD_INSERT_LIBRARIES=/Users/runner/micromamba/envs/grass-env/lib/clang/20/lib/darwin/libclang_rt.asan_osx_dynamic.dylib ./run.py
CTYPESFLAGS = --no-embed-preamble --strip-build-path "$(ARCH_DISTDIR)" \
--cpp "$(CC) -E $(CPPFLAGS) $(LFS_CFLAGS) $(EXTRA_CFLAGS) $(NLS_CFLAGS) $(DEFS) $(EXTRA_INC) $(INC) -D__GLIBC_HAVE_LONG_LONG"
EXTRA_CLEAN_FILES := $(wildcard ctypesgen/*.pyc) $(wildcard ctypesgen/*/*.pyc)
Expand Down
Loading