Skip to content

SR-2100 - Add support for multi-lib systems #1477

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

Closed
wants to merge 1 commit into from
Closed

SR-2100 - Add support for multi-lib systems #1477

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 15, 2018

SR-2100 - Add support for multi-lib systems

Create the --libdir build option on config.py that set library dir name, default to "lib",
so platforms that uses "lib64" can set this as the libdir name.

This works by setting a new LIBDIR variable, used on file copies by the installer.

@@ -30,7 +30,7 @@ class TestURLSession : LoopbackServerTest {
("test_finishTaskAndInvalidate", test_finishTasksAndInvalidate),
("test_taskError", test_taskError),
("test_taskCopy", test_taskCopy),
("test_cancelTask", test_cancelTask),
// ("test_cancelTask", test_cancelTask),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why has this test been disabled?

Copy link
Author

@ghost ghost Mar 15, 2018

Choose a reason for hiding this comment

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

This test resulted in a odd intermittent failure, but i never bothered to track why since i put all my effort on SR-2100 and it was clearly unrelated to my modifications on the build script, maybe this test failure was specific of my build setup, likely due my firewall.

I forgot to uncomment before doing the pull request since i commented that long ago on my multilib branch, I will re-enable. Please, ask the swift-ci bot to retest it just to be sure.

@spevans
Copy link
Contributor

spevans commented Mar 15, 2018

@swift-ci please test

1 similar comment
@spevans
Copy link
Contributor

spevans commented Mar 15, 2018

@swift-ci please test

@parkera
Copy link
Contributor

parkera commented Mar 15, 2018

Seems reasonable to me.

@alblue
Copy link
Contributor

alblue commented Mar 19, 2018

@swift-ci please test

Copy link
Contributor

@millenomi millenomi left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

configure Outdated
@@ -136,6 +136,7 @@ def main():
config.script_path = config.source_root.path_by_appending("build.py")
config.build_script_path = config.source_root.path_by_appending("build.ninja")
config.config_path = config.source_root.path_by_appending(".configuration")
config.libdir = os.getenv("LIBDIR", "lib")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm always a little scared about repeatable builds when the config script picks up from the build-host environment. Is there a way to do this via the config setup that we have instead?

Copy link
Author

Choose a reason for hiding this comment

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

Sure, i can add it as a configure command line option, creating a "--libdir" switch using the parser with a default "lib" value. It will imply in a minor modification on build-script-impl at swift repository, but there is no problem since nobody is reviewing that pull request.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I'd prefer this approach. Thanks!

@millenomi
Copy link
Contributor

@Capent What's the corresponding build-script pull request?

@ghost
Copy link
Author

ghost commented Mar 20, 2018

@millenomi It's here.

@millenomi
Copy link
Contributor

Please test with following pull request:
swiftlang/swift#15260

@swift-ci please test

@ghost
Copy link
Author

ghost commented Mar 20, 2018

@millenomi This swift-ci test will not work, because the pull request swiftlang/swift#15260 requires the following pull requests to work:
apple/swift-corelibs-libdispatch#348
apple/swift-corelibs-xctest#213
apple/swift-package-manager#1538
apple/swift-lldb#397
apple/swift-llbuild#245

I should have explained myself better in my last answer, sorry!

The issue with the swiftlang/swift#15260 is that it integrates also the changes needed to build all 'SR-2100' pull requests that i did these repositories above, since it incorporates the "master" build script, and the build script expects the new command line arguments from the other repositories as well.

As it is, this pull request here is designed to work both with current build script from swift, and the one from the pull request, since it define default values and you can omit the suffix from the build command (the --libdir-suffix is optional).

@millenomi
Copy link
Contributor

Please let me know if assistance is required in merging. LGTM.

configure Outdated
parser.add_argument('--reconfigure', dest='reconfigure', action="store_true", help="re-generate the build script given the previous configuration")
parser.add_argument('-v', '--verbose', dest='verbose', action="store_true")
args, extras = parser.parse_known_args()

config.libdir = "lib" + args.libdir_suffix

Copy link
Contributor

Choose a reason for hiding this comment

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

If the default is None, concatenation without that flag passed will throw an exception. Perhaps check?

Copy link
Author

Choose a reason for hiding this comment

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

True, it will throw an exception. Changed for a explicit default before the parse, and then check before concatenating the string.

@millenomi
Copy link
Contributor

Actually, one problem.

@ghost
Copy link
Author

ghost commented Mar 24, 2018

I believe that this change will do it.

@millenomi
Copy link
Contributor

@swift-ci please test

@alblue
Copy link
Contributor

alblue commented Apr 12, 2018

Can we rebase these changes onto master, instead of merging upstream tracking branches in? It will be cleaner in the history when it's finally merged if we do this.

@ghost
Copy link
Author

ghost commented Apr 13, 2018

@alblue Ok, i will try, but it may make a mess out of this chat history.

set library dir name, default to "lib",
so platforms that uses "lib64" can set this as the libdir name.

This works by setting a new LIBDIR variable, used on file copies by the installer
@millenomi
Copy link
Contributor

@swift-ci please test

@millenomi
Copy link
Contributor

This PR no longer has an author. I'm closing it for now, but please comment here if you want to take ownership of this.

@millenomi millenomi closed this Oct 10, 2018
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.

5 participants