Skip to content
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

Introduce -emit-api-descriptor-path option #1460

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Oct 6, 2023

This option and its argument, when specified on the driver command line, should be passed through to jobs that emit modules and have access to the whole module.

Resolves rdar://116538520

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

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

LGTM

let jobs = try driver.planBuild().removingAutolinkExtractJobs()
let compileJob = try XCTUnwrap(jobs.first(where: {$0.kind == .compile}))

let supplementaryOutputs = try XCTUnwrap(compileJob.commandLine.supplementaryOutputFilemap)
Copy link
Contributor

Choose a reason for hiding this comment

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

does this always use file map file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently so with enough input files. This is the logic that determines whether or not an output file map will be used:

if inputsGeneratingCodeCount * FileType.allCases.count > fileListThreshold {

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, my question is if you just pass the option to set threshold to 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yeah I could do that.

@tshortli tshortli force-pushed the api-extract-supplementary-output branch from 7e7543b to ca0a910 Compare October 7, 2023 00:08
@tshortli
Copy link
Contributor Author

tshortli commented Oct 7, 2023

@swift-ci please test

@tshortli
Copy link
Contributor Author

tshortli commented Oct 7, 2023

@swift-ci please test Windows

This option and its argument, when specified on the driver command line, should
be passed through to jobs that emit modules and have access to the whole
module.

Resolves rdar://116538520
@tshortli tshortli force-pushed the api-extract-supplementary-output branch from ca0a910 to bab5b4c Compare October 9, 2023 17:25
@tshortli
Copy link
Contributor Author

tshortli commented Oct 9, 2023

In the latest change I've also updated all the existing tests to use the new utility for extracting the supplementary file map from the command line.

@tshortli
Copy link
Contributor Author

tshortli commented Oct 9, 2023

@swift-ci test

@tshortli
Copy link
Contributor Author

tshortli commented Oct 9, 2023

@swift-ci test Windows

1 similar comment
@tshortli
Copy link
Contributor Author

tshortli commented Oct 9, 2023

@swift-ci test Windows

@tshortli tshortli merged commit 1ac2578 into swiftlang:main Oct 9, 2023
@tshortli tshortli deleted the api-extract-supplementary-output branch October 9, 2023 23:40
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