fix: too large shadow-rs consts (#4506)

This commit is contained in:
LFC
2024-08-05 15:05:14 +08:00
committed by GitHub
parent 79f10d0415
commit 803780030d

View File

@@ -12,9 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::collections::BTreeSet;
use std::env;
use build_data::{format_timestamp, get_source_time};
use shadow_rs::{CARGO_METADATA, CARGO_TREE};
fn main() -> shadow_rs::SdResult<()> {
println!("cargo:rerun-if-changed=.git/refs/heads");
@@ -33,6 +35,10 @@ fn main() -> shadow_rs::SdResult<()> {
// made as a submodule in another repo.
let src_path = env::var("CARGO_WORKSPACE_DIR").or_else(|_| env::var("CARGO_MANIFEST_DIR"))?;
let out_path = env::var("OUT_DIR")?;
let _ = shadow_rs::Shadow::build_with(src_path, out_path, Default::default())?;
let _ = shadow_rs::Shadow::build_with(
src_path,
out_path,
BTreeSet::from([CARGO_METADATA, CARGO_TREE]),
)?;
Ok(())
}