-
-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for Intel Compiler #980
Comments
Supporting the intel compiler is not very troublesome, but I remember it is not free, and I have no intel compiler available for testing on my macOS/windows. |
If you point me to the related files I might try. |
we need add find_icc.lua/find_icl.lua/find_icpc.lua to find intel compiler and linker. https://github.com/xmake-io/xmake/blob/master/xmake/modules/detect/tools/find_gcc.lua add has_flags.lua to detect all supported flags. add icc.lua/icl.lua/icpc.lua to implement core code for intel compiler. https://github.com/xmake-io/xmake/blob/master/xmake/modules/core/tools/gcc.lua add toolchains/icc/xmake.lua for intel toolchain. https://github.com/xmake-io/xmake/blob/master/xmake/toolchains/gcc/xmake.lua use icc toolchain xmake f --toolchain=icc
xmake
|
Could you create the files (For now, copy GCC's for POSIX and MSVC for Windows)? |
I will create a icc branch and create these files. |
You can edit and commit to the icc branch. https://github.com/xmake-io/xmake/tree/icc Test find_icc/icl.lua cd one_non_xmake_projectdir (without .xmake cache)
xmake l lib.detect.find_tool icc
xmake l lib.detect.find_tool icl
xmake l lib.detect.find_tool icpc Test icc toolchain xmake f --toolchain=icc -c -vD
xmake -r -vD |
I don't have any This is the Environment Variable in Windows when running the Intel Compiler Environment CMD:
This is on I think what should be done on Windows is looking for Then we should define What do you think? UpdateAnother useful information is any version define the path |
I have installed the free 30-day trial version and I will attempt to support it. |
I have supported for intel c/c++ compiler on linux/macos/windows. you can update to the dev branch and try it. xmake f --toolchain=icc -c
xmake -rv Windows [ 50%]: compiling.release src\main.cpp
"C:\\Program Files (x86)\\IntelSWTools\\compilers_and_libraries_2020.2.254\\windows\\bin\\intel64\\icl.exe" -c -Ox -fp:fast -Fobuild\.objs\test\windows\x64\release\src\main.cpp.obj src\main.cpp
checking for flags (/sourceDependencies C:\Users\ruki\AppData\Local\Temp\.xmake\201006\_EE0E6C54EDAD4408BFF68AAEF6078DC7.json) ... no
[ 75%]: linking.release test.exe
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\VC\\Tools\\MSVC\\14.27.29109\\bin\\HostX64\\x64\\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 /opt:ref /opt:icf /ltcg -out:build\windows\x64\release\test.exe build\.objs\test\windows\x64\release\src\main.cpp.obj
[100%]: build ok! macOS [ 50%]: ccache compiling.release src/main.cpp
/usr/local/bin/ccache /usr/local/bin/icpc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidd
en -O3 -I/usr/local/include -o build/.objs/demo/macosx/x86_64/release/src/main.cpp.o src/main.c
pp
[ 37%]: ccache compiling.release src/interface.cpp
/usr/local/bin/ccache /usr/local/bin/icpc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidd
en -O3 -I/usr/local/include -o build/.objs/test/macosx/x86_64/release/src/interface.cpp.o src/i
nterface.cpp
checking for flags (-MMD -MF) ... ok
checking for flags (-fcolor-diagnostics) ... ok
[ 62%]: archiving.release libtest.a
/usr/bin/ar -cr build/macosx/x86_64/release/libtest.a build/.objs/test/macosx/x86_64/release/sr
c/interface.cpp.o
[ 87%]: linking.release demo
/usr/local/bin/icpc -o build/macosx/x86_64/release/demo build/.objs/demo/macosx/x86_64/release/
src/main.cpp.o -m64 -Lbuild/macosx/x86_64/release -Wl,-x -L/usr/local/lib -L/usr/lib -ltest
[100%]: build ok! |
Is it always |
always icc, a short name of intel c++ compiler |
BTW, now I have also supported for Intel Fortran Compiler on linux/macOS/windows. xmake f --toolchain=ifort -c
xmake |
It seems the next version with all those new features will be great! |
Add support for Intel Compiler:
icl
(C
/C++
).Mostly compatible with
MSVC
'scl
with many added features and flags (Optimization Level, Math Precision Level, OpenMP Flag, Vector Extension Flags).macOS
/Linux
:icc
(C
) /icpc
(C++
).Mostly compatible with
GCC
with many added features and flags (Optimization Level, Math Precision Level, OpenMP Flag, Vector Extension Flags).Intel Compiler has the best performance in many scenarios.
The text was updated successfully, but these errors were encountered: