Fix --target flag not passed to cargo when Platform == Server (#3595)
* Fix --target flag not passed to cargo when Platform == Server * revision: use --server-target flag --------- Co-authored-by: Miles Murgaw <milesmurgaw@gmail.com>
This commit is contained in:
1 parent
1fa172486b
commit
b5381e748c
2 files changed
+10
No files matched your search
@@ -270,6 +270,12 @@ impl BuildRequest {
|
||||
true => cargo_args.push("release".to_string()),
|
||||
false => cargo_args.push(self.build.server_profile.to_string()),
|
||||
};
|
||||
|
||||
// If the user provided a server target, use it, otherwise use the default host target.
|
||||
if let Some(target) = self.build.target_args.server_target.as_deref() {
|
||||
cargo_args.push("--target".to_string());
|
||||
cargo_args.push(target.to_string());
|
||||
}
|
||||
} else {
|
||||
// Add required profile flags. --release overrides any custom profiles.
|
||||
let custom_profile = &self.build.profile.as_ref();
|
||||
|
||||
@@ -48,6 +48,10 @@ pub(crate) struct TargetArgs {
|
||||
/// Rustc platform triple
|
||||
#[clap(long)]
|
||||
pub(crate) target: Option<String>,
|
||||
|
||||
/// Specify the server rustc target triple.
|
||||
#[clap(long)]
|
||||
pub(crate) server_target: Option<String>,
|
||||
}
|
||||
|
||||
impl TargetArgs {
|
||||
|
||||
Reference in new issue
Block a user