-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Produce source package in rust-installer format #34366
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ PKG_NAME := $(CFG_PACKAGE_NAME) | |
STD_PKG_NAME := rust-std-$(CFG_PACKAGE_VERS) | ||
DOC_PKG_NAME := rust-docs-$(CFG_PACKAGE_VERS) | ||
MINGW_PKG_NAME := rust-mingw-$(CFG_PACKAGE_VERS) | ||
SRC_PKG_NAME := rust-src-$(CFG_PACKAGE_VERS) | ||
|
||
# License suitable for displaying in a popup | ||
LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT | ||
|
@@ -71,10 +72,10 @@ PKG_FILES := \ | |
|
||
UNROOTED_PKG_FILES := $(patsubst $(S)%,./%,$(PKG_FILES)) | ||
|
||
$(PKG_TAR): $(PKG_FILES) | ||
@$(call E, making dist dir) | ||
$(Q)rm -Rf tmp/dist/$(PKG_NAME) | ||
$(Q)mkdir -p tmp/dist/$(PKG_NAME) | ||
tmp/dist/$$(SRC_PKG_NAME)-image: $(PKG_FILES) | ||
@$(call E, making src image) | ||
$(Q)rm -Rf tmp/dist/$(SRC_PKG_NAME)-image | ||
$(Q)mkdir -p tmp/dist/$(SRC_PKG_NAME)-image/lib/rustlib/src/rust | ||
$(Q)tar \ | ||
-C $(S) \ | ||
-f - \ | ||
|
@@ -87,10 +88,11 @@ $(PKG_TAR): $(PKG_FILES) | |
--exclude=*/llvm/test/*/*/*.ll \ | ||
--exclude=*/llvm/test/*/*/*.td \ | ||
--exclude=*/llvm/test/*/*/*.s \ | ||
-c $(UNROOTED_PKG_FILES) | tar -x -f - -C tmp/dist/$(PKG_NAME) | ||
-c $(UNROOTED_PKG_FILES) | tar -x -f - -C tmp/dist/$(SRC_PKG_NAME)-image/lib/rustlib/src/rust | ||
|
||
$(PKG_TAR): tmp/dist/$$(SRC_PKG_NAME)-image | ||
@$(call E, making $@) | ||
$(Q)tar -czf $(PKG_TAR) -C tmp/dist $(PKG_NAME) | ||
$(Q)rm -Rf tmp/dist/$(PKG_NAME) | ||
$(Q)tar -czf $(PKG_TAR) -C tmp/dist/$(SRC_PKG_NAME)-image/lib/rustlib/src rust --transform 's,^rust,$(PKG_NAME),S' | ||
|
||
dist-tar-src: $(PKG_TAR) | ||
|
||
|
@@ -259,6 +261,19 @@ endef | |
$(foreach host,$(CFG_HOST),\ | ||
$(eval $(call DEF_INSTALLER,$(host)))) | ||
|
||
dist/$(SRC_PKG_NAME).tar.gz: tmp/dist/$(SRC_PKG_NAME)-image | ||
@$(call E, build: $@) | ||
$(Q)$(S)src/rust-installer/gen-installer.sh \ | ||
--product-name=Rust \ | ||
--rel-manifest-dir=rustlib \ | ||
--success-message=Awesome-Source. \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol |
||
--image-dir=tmp/dist/$(SRC_PKG_NAME)-image \ | ||
--work-dir=tmp/dist \ | ||
--output-dir=dist \ | ||
--package-name=$(SRC_PKG_NAME) \ | ||
--component-name=rust-src \ | ||
--legacy-manifest-dirs=rustlib,cargo | ||
|
||
# When generating packages for the standard library, we've actually got a lot of | ||
# artifacts to choose from. Each of the CFG_HOST compilers will have a copy of | ||
# the standard library for each CFG_TARGET, but we only want to generate one | ||
|
@@ -329,8 +344,8 @@ distcheck-docs: dist-docs | |
# Primary targets (dist, distcheck) | ||
###################################################################### | ||
|
||
MAYBE_DIST_TAR_SRC=dist-tar-src | ||
MAYBE_DISTCHECK_TAR_SRC=distcheck-tar-src | ||
MAYBE_DIST_TAR_SRC=dist-tar-src dist/$(SRC_PKG_NAME).tar.gz | ||
MAYBE_DISTCHECK_TAR_SRC=distcheck-tar-src dist/$(SRC_PKG_NAME).tar.gz | ||
|
||
# FIXME #13224: On OS X don't produce tarballs simply because --exclude-vcs don't work. | ||
# This is a huge hack because I just don't have time to figure out another solution. | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Unfortunately I think we need to keep producing both formats. The old format is for people building rust, the new one is for people installing it for other purposes.
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.
Oh, I think I see what you are doing to produce both.
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.
Yep it should still produce the old .tar.gz exactly as before