Skip to content

Commit

Permalink
fix compiler options for Mac: single_module deprecated and select cor…
Browse files Browse the repository at this point in the history
…rect architecture
  • Loading branch information
wlav committed Jan 19, 2024
1 parent 4c70981 commit 38c0b0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bench/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ cppyy_cppflags=$(shell $(clingconfig) --cflags) $(cppflags)

PLATFORM := $(shell uname -s)
ifeq ($(PLATFORM),Darwin)
cppflags+=-dynamiclib -single_module -arch x86_64 -undefined dynamic_lookup
MACHINE := $(shell uname -m)
cppflags+=-dynamiclib -arch $(MACHINE) -undefined dynamic_lookup
endif

py11_%.so: py11_%.cxx lib%.so
Expand All @@ -43,7 +44,7 @@ lib%.so: %.cxx

# note -O2 for cxx to make sure code actually runs instead of being optimized out of existence
%_main: %_main.cxx lib%.so
$(CXX) -O2 -fPIC -o $@ $*_main.cxx -L. -l$*
$(CXX) -std=c++11 -O2 -fPIC -o $@ $*_main.cxx -L. -l$*

.PHONY: bench clean

Expand Down

0 comments on commit 38c0b0d

Please sign in to comment.