Skip to content

Fix ld warning #197

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 1 commit into from
Jul 29, 2017
Merged

Fix ld warning #197

merged 1 commit into from
Jul 29, 2017

Conversation

ianpartridge
Copy link
Contributor

When building the SwiftXCTest target in Xcode 9 beta 4, ld reports the following warning:

Ld /Users/ipartrid/Library/Developer/Xcode/DerivedData/Foundation-dlbuoxyagtlausbjtyopapynebeb/Build/Products/Debug/SwiftXCTest.framework/Versions/A/SwiftXCTest normal x86_64
    cd /Users/ipartrid/swift-corelibs-xctest
    export MACOSX_DEPLOYMENT_TARGET=10.11
    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/ipartrid/Library/Developer/Xcode/DerivedData/Foundation-dlbuoxyagtlausbjtyopapynebeb/Build/Products/Debug -F/Users/ipartrid/Library/Developer/Xcode/DerivedData/Foundation-dlbuoxyagtlausbjtyopapynebeb/Build/Products/Debug -F../swift-corelibs-foundation/build/Debug -filelist /Users/ipartrid/Library/Developer/Xcode/DerivedData/Foundation-dlbuoxyagtlausbjtyopapynebeb/Build/Intermediates.noindex/XCTest.build/Debug/SwiftXCTest.build/Objects-normal/x86_64/SwiftXCTest.LinkFileList -install_name @rpath/SwiftXCTest.framework/Versions/A/SwiftXCTest -Xlinker -rpath -Xlinker @executable_path/../Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -mmacosx-version-min=10.11 -Xlinker -object_path_lto -Xlinker /Users/ipartrid/Library/Developer/Xcode/DerivedData/Foundation-dlbuoxyagtlausbjtyopapynebeb/Build/Intermediates.noindex/XCTest.build/Debug/SwiftXCTest.build/Objects-normal/x86_64/SwiftXCTest_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-link-runtime -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -Xlinker -add_ast_path -Xlinker /Users/ipartrid/Library/Developer/Xcode/DerivedData/Foundation-dlbuoxyagtlausbjtyopapynebeb/Build/Intermediates.noindex/XCTest.build/Debug/SwiftXCTest.build/Objects-normal/x86_64/SwiftXCTest.swiftmodule -framework SwiftFoundation -single_module -Xlinker -dependency_info -Xlinker /Users/ipartrid/Library/Developer/Xcode/DerivedData/Foundation-dlbuoxyagtlausbjtyopapynebeb/Build/Intermediates.noindex/XCTest.build/Debug/SwiftXCTest.build/Objects-normal/x86_64/SwiftXCTest_dependency_info.dat -o /Users/ipartrid/Library/Developer/Xcode/DerivedData/Foundation-dlbuoxyagtlausbjtyopapynebeb/Build/Products/Debug/SwiftXCTest.framework/Versions/A/SwiftXCTest

ld: warning: directory not found for option '-F../swift-corelibs-foundation/build/Debug'

As far as I can tell, this directory is just not used by the build system and I'm not sure why it's been added to the Framework Search Paths for that target.

This PR removes the references, and hence the warning.

@modocache
Copy link
Contributor

@swift-ci please test

@modocache
Copy link
Contributor

It looks like this was intentionally added in #192. Maybe @spevans would have a better idea whether it's still necessary?

@ianpartridge
Copy link
Contributor Author

Ah, thanks I hadn't found #192. Maybe this PR is wrong then.

@spevans
Copy link
Contributor

spevans commented Jul 28, 2017

I think as long as you can open XCTest.xcworkspace and run the test on TestFoundation ok then this is fine. Also the same for Foundation.workspace for swiftlang/swift-corelibs-foundation#1139 (which worked ok for me)

@spevans
Copy link
Contributor

spevans commented Jul 28, 2017

Btw, I think the tests for the XCTest PRs actually build using Xcode on the CI server so if the Swift Test OSX Platform comes back ok then I think we are good. Although I think it does a Debug build of swift hence why it seems to take 2.5 hours!

@ianpartridge
Copy link
Contributor Author

Thanks @spevans hopefully we are good with this one then.

@briancroom
Copy link
Contributor

I could imagine the projects building to that directory if you opened the xcodeproj directly and had Xcode configured to use a custom build directory. Nonetheless with the workspace and the usual configuration, Foundation and XCTest should build to the shared DerivedData without extra search paths being needed.

The CI checks passed, so I think we're good. Thanks @ianpartridge!

@briancroom briancroom merged commit 73190ac into swiftlang:master Jul 29, 2017
@ianpartridge ianpartridge deleted the ld-warning branch July 29, 2017 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants