Skip to content

Commit f18ae82

Browse files
galakcarlescufi
authored andcommitted
oneapi: disable use of libirc when building C++
When building with C++ the icx compiler will try to utilize optimized versions of memset/memcpy that are provided as part of libirc. However libirc also has dependencies on things likes getenv/setenv, etc that are expect in a linux host environment. So disable use of libirc via compiler flag -no-intel-lib=libirc. Signed-off-by: Kumar Gala <[email protected]>
1 parent 0342deb commit f18ae82

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmake/compiler/icx/target.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ foreach(isystem_include_dir ${NOSTDINC})
4040
endforeach()
4141

4242
if(CONFIG_64BIT)
43-
string(APPEND TOOLCHAIN_C_FLAGS "-m64")
43+
list(APPEND TOOLCHAIN_C_FLAGS "-m64")
4444
else()
45-
string(APPEND TOOLCHAIN_C_FLAGS "-m32")
45+
list(APPEND TOOLCHAIN_C_FLAGS "-m32")
4646
endif()
4747

4848

@@ -67,3 +67,7 @@ string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
6767
macro(toolchain_cc_nostdinc)
6868
zephyr_compile_options( -nostdinc)
6969
endmacro()
70+
71+
if(CONFIG_CPP)
72+
list(APPEND TOOLCHAIN_C_FLAGS "-no-intel-lib=libirc")
73+
endif()

0 commit comments

Comments
 (0)