You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to build any project using sweetpad, the build fails with an error unknown option: -XLinker from ld. Checking man, it seems that that isn't an option of ld at all, but rather an option of clang.
Digging a little bit further, the problem doesn't occur, when the LD environment variable isn't set. The above output was produced with LD=/usr/bin/ld. With LD unset, it seems to pass these arguments to /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang instead.
As a workaround, LD can be unset, but this is liable to cause problems with other tools that need to know the correct linker to use when building for the system (which in the case of macOS should typically be /usr/bin/ld). If clang needs to be run as a linker instead of ld when building for iOS, I think it would be nice if Sweetpad would ignore the environment variable (which is also what XCode does).
jp-hoehmann
changed the title
-XLinker passed as option to ld
The linker specified in $LD is used, even when a specific linker is needed for the build
Nov 16, 2024
When I try to build any project using sweetpad, the build fails with an error
unknown option: -XLinker
from ld. Checking man, it seems that that isn't an option of ld at all, but rather an option of clang.Environment:
Steps taken:
Observed error:
The text was updated successfully, but these errors were encountered: