[write-config] Add rust_api_level_cfg_flags.txt Includes the needed rustflags to fix workflow breakages introduced by api-level-conditional features (fuchsia_api_level_at_least). Test: built and ran locally and verified that `fargo check` worked for netstack3. Change-Id: Ibf9d0a69bc10a0f5606365c7000e788e4990ba1b Reviewed-on: https://fuchsia-review.googlesource.com/c/fargo/+/1045952 Reviewed-by: Bruno Dal Bo <brunodalbo@google.com>
diff --git a/src/lib.rs b/src/lib.rs index e4d28f2..b2845c5 100644 --- a/src/lib.rs +++ b/src/lib.rs
@@ -30,7 +30,7 @@ }; use manifest::Manifest; -use anyhow::{anyhow, bail, Error, Context as _}; +use anyhow::{anyhow, bail, Context as _, Error}; use std::fs; use std::fs::File; use std::io::Write; @@ -428,6 +428,10 @@ get_user_libc_path(target_options)?.to_string_lossy() ), format!("-Lnative={}", shared_libraries_path(target_options)?.to_string_lossy()), + format!( + "@{}/rust_api_level_cfg_flags.txt", + target_out_dir(target_options.config)?.to_string_lossy() + ), ]; if get_triple_cpu(target_options) == "aarch64" {