Skip to content

Conversation

@gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Sep 2, 2021

Otherwise, swift-refactor always assumes the stdlib is shipped with it. This is not true when doing a stage 2 stdlib build.

This lets one customize in the compiler invocation where the compiler looks for
the stdlib. This is necessary if the toolchain is not using a stdlib installed
with it.
@gottesmm
Copy link
Contributor Author

gottesmm commented Sep 2, 2021

@swift-ci test

(sdk_overlay_link_path_dir, sdk_overlay_link_path_dir))
lit_config.note('Using SDK overlay dir: ' + test_sdk_overlay_dir)
resource_dir_opt += (" %s" % sdk_overlay_dir_opt)
config.resource_dir_opt += (" %s" % sdk_overlay_dir_opt)
Copy link
Contributor

Choose a reason for hiding this comment

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

These tools (swift-ide-test, swift-refactor, sourcekitd-test) have a different CLI than the driver, and only handle certain options. I suggest we split this -L %s -Xlinker -rpath -Xlinker %s ... into a separate variable in lit so that we can pass only -resource-dir %s to these tools.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. I can fix this in a follow on PR. It isn't directly related to this.

@gottesmm gottesmm merged commit 5b10335 into swiftlang:main Sep 3, 2021
@gottesmm gottesmm deleted the pr-647d874e9cb1793da138aab4d9e0a864f3555227 branch September 3, 2021 00:58
Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Changes to swift-refactor LGTM.

config.resource_dir_opt = ""
if test_resource_dir:
resource_dir_opt = ("-resource-dir %s" % test_resource_dir)
config.resource_dir_opt = ("-resource-dir %s" % test_resource_dir)
Copy link
Member

Choose a reason for hiding this comment

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

3 spaces indentation?

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