[tools/rexm] Respect RAYLIB_LIBTYPE=STATIC during desktop linking#5545
Closed
TheLazyIndianTechie wants to merge 1 commit into
Closed
[tools/rexm] Respect RAYLIB_LIBTYPE=STATIC during desktop linking#5545TheLazyIndianTechie wants to merge 1 commit into
TheLazyIndianTechie wants to merge 1 commit into
Conversation
Owner
|
Both lines are exactly the same, not sure how it has been tested. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fix
tools/rexm/Makefileso desktop builds actually honorRAYLIB_LIBTYPE=STATICwhen selecting the raylib library to link.Before this change,
RAYLIB_LIBTYPEdefaulted toSTATICbutLDLIBSstill used-lraylib, which can resolve to a shared library when one is present insrc.Problem Reproduction
Environment: macOS (clang), working from repository root.
Root Cause
tools/rexm/MakefilesetsRAYLIB_LIBTYPE ?= STATIC, but for desktop targets it still links with-lraylib, allowing the linker to pick a shared artifact when available.Fix
RAYLIB_LINK_LIB:$(RAYLIB_LIB_PATH)/libraylib.awhenRAYLIB_LIBTYPE=STATIC-lraylibotherwiseLDLIBSraylib entry to use$(RAYLIB_LINK_LIB)on Windows/Linux/macOS/BSD.Validation
make clean && makeintools/rexmnow links explicitly to../../src/libraylib.aby default.otool -L ./rexmno longer shows a dynamiclibraylibdependency in static mode../rexm --helpand./rexm validate ../../examples/examples.hrun successfully in static mode, even with shared raylib artifacts present insrc.Scope
Small Makefile-only change in
tools/rexm/Makefile; no behavior changes outside library selection for linking.