Skip to content

Commit

Permalink
[druntime: Clarify that DFLAGS_BASE in common.mak are an LDC extension]
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Sep 20, 2024
1 parent cd9f493 commit 99883ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions runtime/druntime/test/common.mak
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ ifeq (,$(findstring ldmd2,$(DMD)))
CFLAGS_BASE+=--target=x86_64-darwin-apple # ARM cpu is not supported by dmd
endif
endif
# LDC: include optional DFLAGS_BASE and use `-defaultlib=druntime-ldc [-link-defaultlib-shared]` instead of `-defaultlib= -L$(DRUNTIME[_IMPLIB])`
DFLAGS:=$(MODEL_FLAG) $(PIC) $(DFLAGS_BASE) -w -I../../src -I../../import -I$(SRC) -defaultlib=$(if $(findstring ldmd2,$(DMD)),druntime-ldc,) -preview=dip1000 $(if $(findstring $(OS),windows),,-L-lpthread -L-lm $(LINKDL))
# LDC:
# * include optional DFLAGS_BASE
# * use `-defaultlib=druntime-ldc [-link-defaultlib-shared]` instead of `-defaultlib= -L$(DRUNTIME[_IMPLIB])`
DFLAGS:=$(MODEL_FLAG) $(PIC) $(if $(findstring ldmd2,$(DMD)),$(DFLAGS_BASE),) -w -I../../src -I../../import -I$(SRC) -defaultlib=$(if $(findstring ldmd2,$(DMD)),druntime-ldc,) -preview=dip1000 $(if $(findstring $(OS),windows),,-L-lpthread -L-lm $(LINKDL))
# LINK_SHARED may be set by importing makefile
ifeq (,$(findstring ldmd2,$(DMD)))
DFLAGS+=$(if $(LINK_SHARED),-L$(DRUNTIME_IMPLIB) $(if $(findstring $(OS),windows),-dllimport=all),-L$(DRUNTIME))
Expand Down

0 comments on commit 99883ac

Please sign in to comment.