Skip to content

Commit

Permalink
fix: too large shadow-rs consts (#4506)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelScofield authored Aug 5, 2024
1 parent 79f10d0 commit 8037800
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/common/version/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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(())
}

0 comments on commit 8037800

Please sign in to comment.