Skip to content

Conversation

AnthonyLatsis
Copy link
Collaborator

Follow-up to #62156.

@AnthonyLatsis
Copy link
Collaborator Author

Why is this line needed if we set the default in _apply_default_arguments anyway? And it doesn’t seem to have an effect — the build variant is always None in _apply_default_arguments if not specified.

https://github.com/apple/swift/blob/9dceb378e0293a6307322209e1de52f7223dc578/utils/build_swift/build_swift/driver_arguments.py#L807

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci python lint

Copy link
Contributor

@LucianoPAlmeida LucianoPAlmeida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@AnthonyLatsis AnthonyLatsis added build-script Area → utils: The build script contributor experience utils Area: the build system and other accessory scripts under the "utils" directory generated Xcode project labels Jan 29, 2023
@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

@@ -357,7 +357,7 @@ while retaining the option of building with Ninja on the command line.

Assuming that you have already [built the toolchain via Ninja](#the-actual-build),
several more steps are necessary to set up this environment:
* Generate Xcode projects with `utils/build-script --release --swift-darwin-supported-archs "$(uname -m)" --xcode --clean`.
* Generate Xcode projects with `utils/build-script --swift-darwin-supported-archs "$(uname -m)" --xcode --clean`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why we need to pass this flag?

--swift-darwin-supported-archs

@edymtt might have more insight.

Copy link
Collaborator Author

@AnthonyLatsis AnthonyLatsis Jan 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the Xcode generator? Yes, because of errors like this one:

CMake Error in SwiftCompilerSources/CMakeLists.txt:
The custom command generating

  /Users/mac/Desktop/swift-project/build/Xcode-DebugAssert/swift-macosx-x86_64/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/lib/swift/macosx/x86_64/libcxxshim.modulemap

is attached to multiple targets:

  lib-swift-macosx-arm64-libcxxshim.modulemap
  lib-swift-macosx-x86_64-libcxxshim.modulemap

but none of these is a common dependency of the other(s).  This is not
allowed by the Xcode "new build system".

multiple targets not supported by Xcode

@AnthonyLatsis AnthonyLatsis merged commit 4409c2f into swiftlang:main Feb 1, 2023
@AnthonyLatsis AnthonyLatsis deleted the min-size-xcode branch February 1, 2023 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-script Area → utils: The build script contributor experience generated Xcode project utils Area: the build system and other accessory scripts under the "utils" directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants