11 lines
		
	
	
	
		
			359 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			359 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
use std::env::var;
 | 
						|
 | 
						|
// Necessary because of this issue: https://github.com/rust-lang/cargo/issues/9641
 | 
						|
fn main() -> Result<(), Box<dyn std::error::Error>> {
 | 
						|
    if var("TARGET").unwrap().ends_with("-espidf") {
 | 
						|
        embuild::build::CfgArgs::output_propagated("ESP_IDF")?;
 | 
						|
        embuild::build::LinkArgs::output_propagated("ESP_IDF")?;
 | 
						|
    }
 | 
						|
 | 
						|
    Ok(())
 | 
						|
}
 |