Skip to content

Conversation

@Rostepher
Copy link
Contributor

@Rostepher Rostepher commented Sep 9, 2017

Purpose

This PR is part of my ongoing effort to refactor build-script and build-script-impl into a single script. Here I have re-used part of @rintaro's argparser_builder module from PR #2190 and then implemented a new argument parser for the main script mode.

This PR is still a WIP, I still want to add testing for the argparser_builder module and then integrate it with the main script. There's still some other groundwork to finish before that can be accomplished.

rdar://problem/34336890

@Rostepher
Copy link
Contributor Author

I'm going to add tests that parse in the preset file and ensure that all the presets still work under this new parser. If there's any conflicts I'll consider that a bug in the new implementation. In addition I have planned to manually get all the flags accepted by the current parser implementation and have a static test against that list to ensure all flags are supported.

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

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

Some quick comments.

Copy link
Contributor

Choose a reason for hiding this comment

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

No. We want these to be configurable from the command line. For our smoke tests (where we only test X86), we only want to build the X86 LLVM target.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the purpose of this PR I don't think we should change this value. I don't want to change too much in a single PR. I copied this value from the previous default. It won't be too late to change it in a follow-up PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you keep this as --release-debuginfo. Otherwise, it is ambiguous against --debug.

Copy link
Contributor

Choose a reason for hiding this comment

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

The default for this should be true. It is not expensive and can be useful for tooling purposes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the purpose of this PR I am hesitant to change any default values since I'm already replacing the whole argument parser. I'd rather hold off on reworking the defaults to be more sensible until we have this merged.

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought the default was to have this enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can double check as I make a cleanup pass over this again to make sure all the defaults are preserved (in combination with the new unit-tests).

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make it clear that this only makes the swift compiler, not the stdlib in debug?

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make it clearer here that "the swift compiler" is not controlled by this option?

Copy link
Contributor

Choose a reason for hiding this comment

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

"ist" => "list"

Copy link
Contributor

Choose a reason for hiding this comment

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

Whats up with the format string here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The magical %(default)s format string inputs the default value when the argument parser outputs the help message.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to double check (I didn't look), did you preserve the behavior where --skip-build-llvm builds enough of LLVM to compile Swift archives? (I think it tablegens some things and produces a few utilities, but thats it).

@gottesmm
Copy link
Contributor

I am going to do another pass over this after Ross pings me. He said he is going to make some other changes.

…ParserBuilder DSL based on Rintaro's work last year.
…s and fixed one failing test for stdlib-deployment-targets which I couldn't preserve the old behavior with 1:1.
@swiftlang swiftlang deleted a comment from swift-ci Oct 25, 2017
@swiftlang swiftlang deleted a comment from swift-ci Oct 25, 2017
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 5fb944c

@Rostepher
Copy link
Contributor Author

@swift-ci please test

@Rostepher
Copy link
Contributor Author

@swift-ci please smoke test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3d6883d

@Rostepher Rostepher removed the request for review from bob-wilson October 25, 2017 19:10
@Rostepher
Copy link
Contributor Author

@swift-ci please smoke test

@Rostepher
Copy link
Contributor Author

Closing in favor #12873 and a handful of follow-up PRs which should make reviews much easier.

@Rostepher Rostepher closed this Nov 15, 2017
@Rostepher Rostepher deleted the build-me-a-swift branch November 15, 2017 23:28
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.

3 participants