@@ -445,27 +445,6 @@ pub fn build() -> Result<EspIdfBuildOutput> {
445445 chip. cmake_toolchain_file( )
446446 ] ;
447447
448- // Get the asm, C and C++ flags from the toolchain file, these would otherwise get
449- // overwritten because `cmake::Config` also sets these (see
450- // https://github.com/espressif/esp-idf/issues/7507).
451- let ( asm_flags, c_flags, cxx_flags) = {
452- let extractor_script = cmake:: script_variables_extractor ( & cmake_toolchain_file) ?;
453-
454- let output = embuild:: cmd!(
455- cmake:: cmake( ) ,
456- "-P" ,
457- extractor_script. as_ref( ) . as_os_str( ) ;
458- env=( "IDF_PATH" , idf. esp_idf_dir. path( ) ) )
459- . stdout ( ) ?;
460-
461- let mut vars = cmake:: process_script_variables_extractor_output ( output) ?;
462- (
463- vars. remove ( "CMAKE_ASM_FLAGS" ) . unwrap_or_default ( ) ,
464- vars. remove ( "CMAKE_C_FLAGS" ) . unwrap_or_default ( ) ,
465- vars. remove ( "CMAKE_CXX_FLAGS" ) . unwrap_or_default ( ) ,
466- )
467- } ;
468-
469448 // Get the directories of all extra components to build.
470449 let extra_component_dirs = to_cmake_path_list ( config. native . extra_component_dirs ( ) ?) ?;
471450
@@ -491,9 +470,6 @@ pub fn build() -> Result<EspIdfBuildOutput> {
491470 . define ( "PYTHON" , to_cmake_path_list ( [ & idf. venv_python ] ) ?)
492471 . always_configure ( true )
493472 . pic ( false )
494- . asmflag ( asm_flags)
495- . cflag ( c_flags)
496- . cxxflag ( cxx_flags)
497473 . env ( "IDF_COMPONENT_MANAGER" , idf_comp_manager)
498474 . env ( "EXTRA_COMPONENT_DIRS" , extra_component_dirs)
499475 . env ( "IDF_PATH" , idf. esp_idf_dir . path ( ) )
0 commit comments