Skip to content

Set CARGO_TARGET_DIR when compiling the prepare queries - #1910

Merged
abonander merged 2 commits into
transact-rs:mainfrom
sedrik:1706-support-target-dir-when-cargo-is-available
Jul 13, 2022
Merged

abonander merged 2 commits into
transact-rs:mainfrom
sedrik:1706-support-target-dir-when-cargo-is-available

Conversation

@sedrik

@sedrik sedrik commented Jun 16, 2022

Copy link
Copy Markdown
Contributor

I did try to set rustc's --out-dir but encountered a strange error
stating that it can not be set more than once (even though I am unable
to deduce what else is setting it).

This enabled me to set a custom CARGO_TARGET_DIR and still be able to
prepare queries.

I did try to set rustc's --out-dir but encountered a strange error
stating that it can not be set more than once (even though I am unable
to deduce what else is setting it).

This enabled me to set a custom CARGO_TARGET_DIR and still be able to
prepare queries.
@sedrik
sedrik marked this pull request as ready for review June 16, 2022 21:01
@sedrik

sedrik commented Jun 16, 2022

Copy link
Copy Markdown
Contributor Author

Minor update, I got lost in my thoughts. The end solution was simpler than I had anticipated. :)

@sedrik sedrik changed the title Move compiled query data Set CARGO_TARGET_DIR when compiling the prepare queries Jun 17, 2022
@abonander
abonander merged commit 7d8ded9 into transact-rs:main Jul 13, 2022
JoeyMckenzie pushed a commit to JoeyMckenzie/sqlx that referenced this pull request Jul 13, 2022
…1910)

* Move compiled query data

I did try to set rustc's --out-dir but encountered a strange error
stating that it can not be set more than once (even though I am unable
to deduce what else is setting it).

This enabled me to set a custom CARGO_TARGET_DIR and still be able to
prepare queries.

* Set CARGO_TARGET_DIR in the rustc invocation
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.

2 participants