-
-
Notifications
You must be signed in to change notification settings - Fork 268
Better support building the runtime separately [mod] #4752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
dad1df5
runtime/CMakeLists.txt: Depend only on the full path to the ldc binary
the-horo ee381a3
runtime/CMakeLists.txt: Call cmake_minimum_required before project()
the-horo dcf8555
runtime/CMakeLists.txt: add call to enable_testing()
the-horo 0dcf778
runtime/DRuntimeIntegrationTests.cmake: Pass D_EXTRA_FLAGS to ldmd
the-horo 7f31303
[druntime: Pass D_EXTRA_FLAGS and RT_CFLAGS in {C,D}FLAGS_BASE for ma…
kinke 48b38b2
[druntime: Pass CMAKE_C[XX]_COMPILER as CC/CXX for make-based integra…
kinke 71a6f26
[ldc-build-runtime: Define LDMD_EXE_FULL for druntime integration tests]
kinke 074c388
[druntime: Work around clang-cl bug in test/shared/Makefile]
kinke 03abcf8
CI: Try a different workaround for Apple issue #3901
kinke 29a1eb5
[tiny refactoring wrt. CXX language dependency for runtime build]
kinke 140cb6d
[fix Win32 CI via explicit -m32 for clang-cl used for druntime integr…
kinke 36d6f58
[druntime: Streamline Windows part of stdcpp integration test]
kinke cd9f493
[CI: Make workaround for #3901 a bit less ugly]
kinke 99883ac
[druntime: Clarify that DFLAGS_BASE in common.mak are an LDC extension]
kinke 4d908d3
GHA: Switch to Xcode 16 final
kinke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,24 +131,24 @@ $(ROOT)/dynamiccast$(DOTDLL): $(SRC)/dynamiccast.d $(if $(LINK_SHARED),$(DRUNTI | |
ifeq (windows,$(OS)) | ||
CC:=cl | ||
CC_OUTFLAG:=/Fe | ||
# we additionally specify the .obj output path (/Fo) to prevent collisions | ||
CC_EXTRAS:= | ||
# additionally specify the .obj output directory to prevent collisions | ||
CC_EXTRAS:=/Fo$(ROOT)/ | ||
else | ||
CC_OUTFLAG:=-o | ||
CC_EXTRAS:=$(LDL) -pthread | ||
endif | ||
|
||
$(ROOT)/linkD$(DOTEXE): $(SRC)/linkD.c $(ROOT)/lib$(DOTDLL) $(DRUNTIMESO) | ||
$(QUIET)$(CC) $(CFLAGS) $(CC_OUTFLAG)$@ $(if $(findstring $(OS),windows),/[email protected],) $< $(ROOT)/lib$(DOTIMPLIB) $(CC_EXTRAS) | ||
$(QUIET)$(CC) $(CFLAGS) $(CC_OUTFLAG)$@ $< $(ROOT)/lib$(DOTIMPLIB) $(CC_EXTRAS) | ||
|
||
$(ROOT)/linkDR$(DOTEXE): $(SRC)/linkDR.c $(ROOT)/lib$(DOTDLL) $(DRUNTIMESO) | ||
$(QUIET)$(CC) $(CFLAGS) $(CC_OUTFLAG)$@ $(if $(findstring $(OS),windows),/[email protected],) $< $(DRUNTIME_IMPLIB) $(CC_EXTRAS) | ||
$(QUIET)$(CC) $(CFLAGS) $(CC_OUTFLAG)$@ $< $(DRUNTIME_IMPLIB) $(CC_EXTRAS) | ||
|
||
$(ROOT)/loadDR$(DOTEXE): $(SRC)/loadDR.c $(ROOT)/lib$(DOTDLL) $(DRUNTIMESO) | ||
$(QUIET)$(CC) $(CFLAGS) $(CC_OUTFLAG)$@ $(if $(findstring $(OS),windows),/[email protected],) $< $(CC_EXTRAS) | ||
$(QUIET)$(CC) $(CFLAGS) $(CC_OUTFLAG)$@ $< $(CC_EXTRAS) | ||
|
||
$(ROOT)/host$(DOTEXE): $(SRC)/host.c $(ROOT)/plugin1$(DOTDLL) $(ROOT)/plugin2$(DOTDLL) | ||
$(QUIET)$(CC) $(CFLAGS) $(CC_OUTFLAG)$@ $(if $(findstring $(OS),windows),/[email protected],) $< $(CC_EXTRAS) | ||
$(QUIET)$(CC) $(CFLAGS) $(CC_OUTFLAG)$@ $< $(CC_EXTRAS) | ||
|
||
$(ROOT)/liblinkdep$(DOTDLL): $(ROOT)/lib$(DOTDLL) | ||
$(ROOT)/liblinkdep$(DOTDLL): DFLAGS+=-L$(ROOT)/lib$(DOTIMPLIB) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, this is pretty similar to the Gentoo situation: the CFLAGS env variable used to set up 64-bit clang-cl as C compiler only applies at CMake config-time, affecting the CMake default flags and making it to the builds:
ldc/.github/actions/1-setup/action.yml
Lines 165 to 172 in 1f0c36e
But now with
clang-cl
as druntime integration test CC, that-m32
isn't forwarded, and we need to pass it in via RT_CFLAGS explicitly.[This worked fine with default Microsoft
cl
C compiler from the environment (PATH), which diverges (with different executables in different dirs) across x64 and x86. clang-cl doesn't infer the bitness from the environment apparently.]