[GRADLE-3242] visual studio SDK's include path is getting added multiple times to option.txt Created: 13/Feb/15  Updated: 15/Jul/15  Resolved: 15/Jul/15

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 2.4-rc-1

Type: Bug
Reporter: Sterling Greene Assignee: Sterling Greene
Resolution: Fixed Votes: 0


 Description   

Hi,

I have a module to be compiled with visual studio plugin.
There are around 400+ source and header files. While compiling this there is exception thrown for a specific file saying

07:08:10.192 [QUIET] [system.out] UIGridItem.cpp
07:08:23.209 [QUIET] [system.out] Automatically linking with sfl504as.lib
07:08:26.312 [QUIET] [system.out] Automatically linking with ot1104as.lib
07:08:27.790 [QUIET] [system.out] Automatically linking with og1204a.lib
07:08:27.800 [QUIET] [system.out] Automatically linking with RWUXThemeS10.lib
07:10:20.852 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
07:10:20.853 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe'' finished with exit value -1073740777 (state: FAILED)

07:10:20.853 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':Console:compileX86ReleaseConsoleExecutableConsoleCpp'
07:10:20.854 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :Console:compileX86ReleaseConsoleExecutableConsoleCpp FAILED

When I googled for the error code found out that it is

0xC0000417

STATUSINVALIDCRUNTIME_PARAMETER

and typically occurs when command line arguments length is beyond certain threshold (I guess 8k).

When I looked for options.txt in this folder found out that

"/IC:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
"/IC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include"

these two lines are added 191 times to the compiler options. Probably number of files compiled till now.
So my guess is because of this compiler is crashing.

Is there any way we can stop this redundant appending and force gradle to append only once?

http://forums.gradle.org/gradle/topics/visual-studio-sdks-include-path-is-getting-added-multiple-times-to-option-txt-pni10w59wc8vk


Generated at Wed Jun 30 12:43:41 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.