- 
                Notifications
    
You must be signed in to change notification settings  - Fork 479
 
build: slightly improve the build for libdispatch #785
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
build: slightly improve the build for libdispatch #785
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could use another vfs overlay type thing, or just copy all of the headers into the build directory next to the module map instead of pushing things around inside of the source directory?
This is an improvement over the current state of things though.
| 
           CC @rokhinip, this is the source of our little race condition in CI that crops up from time to time.  | 
    
| 
           That VFS idea 🤔  | 
    
387b87f    to
    e0517b6      
    Compare
  
    | 
           @swift-ci please test  | 
    
| 
           Good. I like it. No more copying things around in the source directories during the build.  | 
    
Avoid polluting the build directory a small amount given that we can use `-fmodule-map-file=` for the C/C++ build of libdispatch. Unfortunately, for the Swift build, we need to have the file copied over due to the umbrella header resolution. Hopefully this reduces some of the race conditions that we have seen in the build. Thanks to @dgregor for reminding me of the flag!
| 
           @swift-ci please test  | 
    
| 
           Linux failure: Windows failure:  | 
    
| 
           Hmm, Linux VFS overlay not quite pointing in the right place maybe?  | 
    
| 
           Hmm. The  So we either need to also add the VFS flags to the Foundation build, or we need to first install Dispatch and then switch the Foundation build to use the installed Dispatch.  | 
    
          
 That would be a day for celebration.  | 
    
Use a VFS overlay to avoid polluting the source tree.
e0517b6    to
    ed909bb      
    Compare
  
    | 
           @DougGregor correct, I had missed that I had given the wrong visibility to the flags.  This is now resolved and   | 
    
| 
           @swift-ci please test  | 
    
| 
           For tracking purposes: 
  | 
    
          
 Sounds like exactly what we want. 🤞  | 
    
| 
           The Linux build got much farther! Now the XCTest tests are failing with  | 
    
| 
           @swift-ci please test Windows  | 
    
| 
           Windows got to the same point; now it's the XCTest failures, but Foundation built and tested properly (!)  | 
    
| 
           Ah, nice! The XCTest failures are not surprising. Fortunately, I had recently enhanced that path for Windows - we just need to make sure that we are passing along the dispatch flags to the tests, not just the build.  | 
    
| 
           So exciting!  | 
    
| 
           Please test with the following PRs: @swift-ci please test  | 
    
…g/swift-corelibs-libdispatch#785 This allows the tests that use libdispatch to find its modulemap, plus add the libdispatch compilation flags to one test that was missing them and fix one async test on linux.
…g/swift-corelibs-libdispatch#785 This allows the tests that use libdispatch to find its modulemap, plus add the libdispatch compilation flags to one test that was missing them and fix one async test on linux.
…g/swift-corelibs-libdispatch#785 This allows the tests that use libdispatch to find its modulemap, plus add the libdispatch compilation flags to one test that was missing them and fix one async test on linux.
Avoid polluting the build directory a small amount given that we can use
-fmodule-map-file=for the C/C++ build of libdispatch. Unfortunately, for the Swift build, we need to have the file copied over due to the umbrella header resolution.Hopefully this reduces some of the race conditions that we have seen in the build.
Thanks to @dgregor for reminding me of the flag!