Open ainopara opened 5 years ago
The case-insensitive conflict between llvmSupport and LLVMSupport is pretty terrifying.
I'll rename indexstoredb's module: https://github.com/apple/indexstore-db/pull/3
-DSWIFT_PACKAGE=1
when generating xcode projects in https://github.com/apple/swift-package-manager/pull/1910Remaining issues
SwiftPM should diagnose case-insensitive module name conflicts, since they blow up on case-insensitive file systems
Ideally we shouldn't have to add the linking flags for ncurses & sqlite3, but maybe the fix for this is to adopt target-specific build settings when they're available?
@swift-ci create
Environment
swift version: DEVELOPMENT-SNAPSHOT-2018-11-01-a swift pm version: DEVELOPMENT-SNAPSHOT-2018-11-01-a Xcode: Version 10.1 (10B61) Xcode Toolchain: Swift Development Snapshot 2018-11-01 (a)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Package Manager | |Labels | Bug, Screened | |Assignee | None | |Priority | Medium | md5: 960dea92de539801c320fe8e5d36f09fIssue Description:
After switching SwiftPM dependency version to `.branch("master")`, sourcekit-lsp now having llbuild as dependency which contains a target named `llvmSupport`
After executing
Open the generated `SourceKitLSP.xcodeproj` trying to build it. First I found a error related to SR-8018 .
Due to generated xcodeproj do not add `SWIFT_PACKAGE` macro to `GCC_PREPROCESSOR_DEFINITIONS`, the workaround in COFF.h
will not be triggered.
This issue can be fixed by manually adding `SWIFT_PACKAGE=1` to `GCC_PREPROCESSOR_DEFINITIONS` in project build settings.
Then I found build failed with error message:
At the same time, building sourcekit-lsp with
will succeed.
The difference is that `swift build` will not generate a LLVMSupport.framework, in fact all the .o file generated with `LLVMSupport` target will only be linked when sourcekit-lsp generated and in this case swiftc is used to generate the binary rather than clang++.
Related fragment in `.build/debug.yaml`:
Is there anything I can do to workaround this issue too?It seems the fact that both `IndexStoreDB` and `llbuild` has the target `LLVMSupport` may be the source of this issue. The target in `llbuild` named `llvmSupport` seems not identical to `LLVMSupport`, but the APFS on my mac is case insensitive file system.The issue can be reproduced by build swift-package-manager project alone with generated xcodeproj.Finally I got sourcekit-lsp build with generated xcodeproj by applying following modifications:
The naming conflect actually is a source of this issue, though not the only source.