Skip to content

[Package] When building a toolchain, don't copy the Resource directory. #33598

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
Aug 24, 2020

Conversation

dcci
Copy link
Member

@dcci dcci commented Aug 22, 2020

Should dramatically improve the size of the snapshost produced,
as we don't have stdlib et similia included twice. Also, it helps when
producing fat binaries, as we don't have to implement any mechanism
for sandwiching all the slices together.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

Should dramatically improve the size of the snapshost produced,
as we don't have stdlib et similia included twice. Also, it helps when
producing fat binaries, as we don't have to implement any mechanism
for sandwiching all the slices together.
@dcci
Copy link
Member Author

dcci commented Aug 22, 2020

@swift-ci build toolchain

@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 8337f96

Install command
tar zxf swift-PR-33598-435-ubuntu16.04.tar.gz
More info

@dcci
Copy link
Member Author

dcci commented Aug 23, 2020

I think this works, but I'll wait for Adrian or Mishal to take a look.

@dcci
Copy link
Member Author

dcci commented Aug 23, 2020

(Incidentally, I noticed that we compile with -fdebug-info=line-tables-only (presumably, to reduce code size), but only when we don't run tests. This means that if the jobs producing the toolchains run tests, they won't benefit from this code size win.
I'll file a separate PR for that, which should be a big net win in code size.

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - 8337f96

Install command
tar -zxf swift-PR-33598-635-osx.tar.gz --directory ~/

@@ -1234,6 +1234,11 @@ verbose-build
build-ninja
build-swift-stdlib-unittest-extra

# When producing a package, don't copy the Swift Resource/ directory.
# This is mainly a space optimization.
Copy link
Contributor

Choose a reason for hiding this comment

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

# When  building for an Xcode toolchain, don't copy the Swift Resource/ directory into the LLDB.framework. LLDB.framework will be installed alongside a Swift compiler, so LLDB should use its resource directory directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll modify this before committing.

@shahmishal
Copy link
Member

@swift-ci test

@adrian-prantl
Copy link
Contributor

(Incidentally, I noticed that we compile with -fdebug-info=line-tables-only (presumably, to reduce code size), but only when we don't run tests. This means that if the jobs producing the toolchains run tests, they won't benefit from this code size win.
I'll file a separate PR for that, which should be a big net win in code size.

@dcci knows this, but for those following along from home I want to point out that on Darwin, the size of the debug info does not affect the code size since the debug info is stored separately from the executable. On ELF (Linux), however, it will affect the final binary size.

@dcci dcci merged commit ead41b4 into swiftlang:master Aug 24, 2020
@dcci
Copy link
Member Author

dcci commented Aug 24, 2020

Comment fixed in:
#33616

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