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
To give you some pointers to get started, I'd begin by looking in LinkerTools.swift near the comment "ld64 reads lines from the file using fgets, without doing any other processing."
Apple's linker needs the arguments NOT quoted, while others (at least GNU, not sure about lld) need it quoted.
You can check the type of linker using code like this:
letoptionContext=awaitdiscoveredCommandLineToolSpecInfo(cbc.producer, cbc.scope, delegate)letlinkerContext=(optionContext as?DiscoveredLdLinkerToolSpecInfo)
if linkerContext?.linker ==.ld64 {...
though it's worth investigating how GNU ld actually interprets quoted arguments in file lists, and whether that's by parsing through the system shell, or something else. We should then apply the reverse transformation.
Finally, you'll want to run the test suite to see if any tests need adjustment, and if necessary, introduce at least one build operation test which includes spaces in the project path such that it will trigger a build failure without your change, and builds successfully after your change.
Non-Apple linkers require quoting in order to handle projects with spaces in their path.
This is handled in LdLinkerSpec when evaluating
__INPUT_FILE_LIST_PATH__
.The text was updated successfully, but these errors were encountered: