Skip to content

Commit

Permalink
Make macOS CI more robust to changes in the SystemC library
Browse files Browse the repository at this point in the history
The GitHub VMs for macOS 12 and 13 are now installing SystemC compiled
with a newer C++ standard than C++11.  This causes the testsuite to
fail to link, because we have hardcoded the flag '-std=c++11'.
In fact, the macOS 12 VM seems to sometimes install a library using
C++11 and sometimes using C++17.  To account for this, identify the
flag to use by looking at the symbols in the library.
  • Loading branch information
quark17 committed Jan 17, 2024
1 parent 3683cf3 commit e4361d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-and-test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,13 @@ jobs:
# because it's invoked with :set -eo pipefile)
trap ./testsuite/archive_logs.sh EXIT
# Identify the C++ standard for linking with the SystemC library
SYSTEMC_CXXSTD=`nm --demangle $(brew --prefix systemc)/lib/libsystemc.dylib | grep sc_api_version_ | sed -E 's/.*_cxx20([0-9][0-9]).*/\1/' | head -1`
make -C testsuite \
TEST_SYSTEMC_INC=$(brew --prefix systemc)/include \
TEST_SYSTEMC_LIB=$(brew --prefix systemc)/lib \
TEST_SYSTEMC_CXXFLAGS=-std=c++11
TEST_SYSTEMC_CXXFLAGS=-std=c++${SYSTEMC_CXXSTD}
# Show ccache stats so we can see what the hit-rate is like.
- name: CCache stats
Expand Down

0 comments on commit e4361d9

Please sign in to comment.