Sysprogs forums › Forums › VisualGDB › Intel compiler
- This topic has 12 replies, 2 voices, and was last updated 6 years, 7 months ago by support.
-
AuthorPosts
-
January 30, 2018 at 11:40 #19885victor_sParticipant
I am trying to add Intel compiler (that comes with Intel system studio Linux host) to VisualGDB (VS2015).
I am building with MSBuild on remote Linux computer with gcc (native and cross) and it works. When I try to add an Intel toolchain path by specifying it manually via “Remote toolchain” I receive a message “Object reference not set to an instance of an object”
I can work with Intel compiler written in Makefile, but Makefile generation also have a bug. When I exclude file from build in vcxproj – The makefile generator doesn’t see it and does not exclude this file from a Makefile sources.
So currently I didn’t succeed with configuration for working with Intel compiler. Will be nice to receive an advice here.
January 31, 2018 at 23:53 #19899supportKeymasterHi,
The easiest way to resolve this would be to manually add a statement filtering out the excluded files to Makefile (using the $(filter–out …) syntax).
Another option would be to patch the VisualGDB MSBuild platform files to run your compiler instead of the gcc. If the Intel compiler command line is compatible with the gcc command line, we can add an option to override the gcc executable via Project Properties. If not, you would need to create a file similar to gcc.xml (in VisualGDB directory) describing the command-line options for the Intel compiler. Let us know if you would like to try this out and we will provide you with a build that allows overriding the compiler name.
February 1, 2018 at 10:08 #19904victor_sParticipantThank you for the help. I want to try a new build. Working with MSBuild is better for me.
Did you mean GCCFlags.xml? However I think icc flags are mostly compatible with gcc.
February 4, 2018 at 00:45 #19934supportKeymasterHi,
No problem, please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2040.msi
GCCFlags.xml is only used in the graphical editor the Makefile CFLAGS/CXXFLAGS, but not with MSBuild projects. The actual GCC build flags are stored in the C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\PropertyPages\gcc.xml file.
When you build your project, VisualGDB will use the following logic to determine how to call the compiler:
- The GNUCompilerType variable from your project settings will be used to set GCCBinaryName and GXXBinaryName (see code in gcc.targets)
- The GCCBinaryName and GXXBinaryName variables will be passed to the GCCCompile task (note that it has 2 invocations) along with the path to the gcc.xml file. The task will either invoke gcc directly (for Windows builds) or write the rules to the Makefile (for Linux builds).
In order to use the Intel compiler instead of gcc, please edit the remotebuild.xml file to support another compiler type (e.g. ICC), enable it via VS Project Properties and then edit the gcc.targets file to set GCCBinaryName and GXXBinaryName accordingly.
If the command-line options are not 100% compatible with GCC, please create a copy of the gcc.xml file, edit the flag definitions and update the references to it in the .targets and .props files, so Visual Studio will load the modified file if the GNUCompilerType is set to ‘Clang’.
February 7, 2018 at 16:17 #19975victor_sParticipantGreat. Thank you.
I see in verbose mode that intel compiler runs. I need to make additional testings yet.
February 8, 2018 at 12:51 #20004victor_sParticipantCompiling works, but it fails at the link stage. It still looks for g++ for linking.
February 9, 2018 at 06:25 #20010supportKeymasterHi,
No problem, please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2051.msi
February 18, 2018 at 15:22 #20161victor_sParticipantIt works nice with this build. Thank you very much.
March 12, 2018 at 16:06 #20371victor_sParticipantHello.
Another issue here – how can I make sure that VisualGDB uses xild for linking and not ld. I suspect that it doesn’t.
March 13, 2018 at 07:19 #20380victor_sParticipantWhen I turn on verbose mode for a linker – I see “GNU ld” working.
March 15, 2018 at 04:40 #20420supportKeymasterHi,
No problem, please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2093.msi
It uses separate variables for gcc/g++ executables used for linking (see link.targets, e.g. GCCBinaryNameForLinking). You can now override them in your custom rule file to use xild instead.
Please note that updating VisualGDB will overwrite any changes you made to the MSBuild files; please ensure you make backups of them.
April 17, 2018 at 09:49 #20706victor_sParticipantHello. Do you plan to integrate it to the main version (release) some time?
April 18, 2018 at 04:28 #20715supportKeymasterHi,
Yes, this should be already included in v5.4 Preview 2.
-
AuthorPosts
- You must be logged in to reply to this topic.