Skip to content

[4.2] [BatchMode] Consolidate reasoning about -{enable,disable}-batch-mode flag. #15754

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

Conversation

graydon
Copy link
Contributor

@graydon graydon commented Apr 5, 2018

Cherry-pick of changes in #15749

EDIT: plus a ride-along of #15556 that disables a flaky test.

Original description:

Previous to this change, the initial inspection of the -{enable,disable}-batch-mode flag was made separate from the subsequent overriding by -wmo; this in turn meant that the driver might decide it's "in batch mode" in one place (in particular, when judging whether to ignore the -num-threads flag) and "in wmo mode" elsewhere (when judging whether to emit one or multiple outputs, which depends on the -num-threads flag).

Divergence between these two views caused the driver to effectively drop the -num-threads flag even when overriding batch mode with wmo; since xcode assumes that passing -wmo -num-threads will cause multiple outputs, this in turn caused linking to fail since the expected output files were not found.

rdar://39191323

graydon added 2 commits April 4, 2018 19:17
…flag.

Previous to this change, the initial inspection of the -{enable,disable}-batch-mode
flag was made separate from the subsequent overriding by -wmo; this in turn meant
that the driver might decide it's "in batch mode" in one place (in particular,
when judging whether to ignore the -num-threads flag) and "in wmo mode" elsewhere
(when judging whether to emit one or multiple outputs, which depends on the
-num-threads flag).

Divergence between these two views caused the driver to effectively drop
the -num-threads flag even when overriding batch mode with wmo; since xcode
assumes that passing -wmo -num-threads _will_ cause multiple outputs, this
in turn caused linking to fail since the expected output files were not found.
@graydon graydon changed the title Rdar 39191323 batch mode flag double vision swift 4.2 branch [4.2] [BatchMode] Consolidate reasoning about -{enable,disable}-batch-mode flag. Apr 5, 2018
@graydon
Copy link
Contributor Author

graydon commented Apr 5, 2018

@swift-ci please test and merge

…imes.

Once the associated bug is fixed we can re-enable.
@graydon
Copy link
Contributor Author

graydon commented Apr 5, 2018

@swift-ci please test and merge

1 similar comment
@graydon
Copy link
Contributor Author

graydon commented Apr 5, 2018

@swift-ci please test and merge

@swift-ci swift-ci merged commit 22d7c3c into swiftlang:swift-4.2-branch Apr 5, 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.

3 participants