Skip to content

Commit

Permalink
Try to fix MacOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy committed Mar 21, 2023
1 parent 3242665 commit 8feb636
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ jobs:
./bootstrap.sh -DENABLE_GC=ON -DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_UNITY_BUILD=ON \
-DProtobuf_INCLUDE_DIR=$PROTOBUF/include \
-DProtobuf_LIBRARY=$PROTOBUF/lib/libprotobuf.dylib \
-DENABLE_PROTOBUF_STATIC=OFF
-DProtobuf_LIBRARY=$PROTOBUF/lib/libprotobuf.dylib
make -Cbuild -j2
- name: Run tests (MacOS)
Expand Down
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,12 @@ if (ENABLE_GC)
set(enable_large_config ON CACHE BOOL "Optimize for large heap or root set.")
add_definitions("-DREDIRECT_REALLOC=GC_REALLOC")
add_definitions("-DREDIRECT_FREE=GC_FREE")
# Do not use threads for MacOS builds (yet).
if(APPLE OR BUILD_STATIC_RELEASE)
if (APPLE)
append("-Wno-deprecated-declarations" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
# add_definitions("-DGC_NO_PTHREAD_SIGMASK")
# add_definitions("-DNO_MARKER_SPECIAL_SIGMASK")
endif()
if(BUILD_STATIC_RELEASE)
set(enable_threads OFF CACHE BOOL "Support threads.")
else()
add_definitions("-DNO_EXECUTE_PERMISSION")
Expand All @@ -170,7 +174,7 @@ if (ENABLE_GC)
FetchContent_Declare(
bdwgc
GIT_REPOSITORY https://github.com/ivmai/bdwgc.git
GIT_TAG 441698c68a90caa1670e9b46275c5db12668d171
GIT_TAG cd1fbc1dbfd2cc888436944dd2784f39820698d7 # v8.2.2
)
FetchContent_MakeAvailable(bdwgc)
include_directories(SYSTEM ${gc_SOURCE_DIR}/include)
Expand Down
2 changes: 1 addition & 1 deletion ir/visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ limitations under the License.
#include "lib/source_file.h"

#if HAVE_LIBGC
#include <gc/gc.h>
#include <gc.h>
#endif

#include "dbprint.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/bitvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ limitations under the License.
#include "config.h"

#if HAVE_LIBGC
#include <gc/gc_cpp.h>
#include <gc_cpp.h>
#define IF_HAVE_LIBGC(X) X
#else
#define IF_HAVE_LIBGC(X)
Expand Down
6 changes: 3 additions & 3 deletions lib/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ limitations under the License.

#include "config.h"
#if HAVE_LIBGC
#include <gc/gc.h>
#include <gc/gc_cpp.h>
#include <gc/gc_mark.h>
#include <gc.h>
#include <gc_cpp.h>
#include <gc_mark.h>
#endif /* HAVE_LIBGC */
#include <sys/mman.h>

Expand Down
2 changes: 1 addition & 1 deletion lib/indent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

#include "config.h"
#if HAVE_LIBGC
#include <gc/gc_cpp.h>
#include <gc_cpp.h>
#define NOGC_ARGS (NoGC, 0, 0)
#else
#define NOGC_ARGS
Expand Down
2 changes: 1 addition & 1 deletion lib/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

#include "config.h"
#if HAVE_LIBGC
#include <gc/gc_cpp.h>
#include <gc_cpp.h>
#define NOGC_ARGS (NoGC, 0, 0)
#else
#define NOGC_ARGS
Expand Down

0 comments on commit 8feb636

Please sign in to comment.