Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

add presubmit_build.sh that passes a flag to swiftpm if it is a stock toolchain #723

Merged
merged 2 commits into from
Dec 18, 2020

Conversation

marcrasi
Copy link
Contributor

I copied this from the internal script in google3, and modified it to pass a flag when building with a stock toolchain.

I'll also make a CL that deletes the script from google3 and calls this one instead.

@marcrasi marcrasi requested a review from BradLarson December 17, 2020 22:19
Comment on lines 34 to 35
swift build ${STOCK_TOOLCHAIN:+"-D -Xswiftc -D TENSORFLOW_USE_STANDARD_TOOLCHAIN"} ;
swift test ${STOCK_TOOLCHAIN:+"-D -Xswiftc -D TENSORFLOW_USE_STANDARD_TOOLCHAIN"} ;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there might be an extra -D in both of these. Should it just be "-Xswiftc -D TENSORFLOW_USE_STANDARD_TOOLCHAIN"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. And there should also be another -Xswiftc, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think just the one is needed if you smoosh the last two together into "-Xswiftc -DTENSORFLOW_USE_STANDARD_TOOLCHAIN". That works for me at the command line.

Copy link
Contributor

Choose a reason for hiding this comment

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

But I tried what you have now with the two of them, and that also works well.

@marcrasi marcrasi merged commit fda0214 into main Dec 18, 2020
@marcrasi marcrasi deleted the stock-toolchain-flag branch December 18, 2020 00:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants