- Jan
- 3
- 0
I'm trying to make the acquaintance of TCC/LE by using it everywhere instead of cmd.exe. However, when I tried to create Windows SDK environment by calling its setenv.cmd with needed parameters, it worked wrong. I found out that the following block of code from setenv.cmd is interpreted differently in cmd.exe and TCC/LE:
When I turned on printing of commands I saw that TCC/LE combined all of the lines within the command group in parentheses with the "&" operator, so that it looked like follows:
Of course, this code becomes absolutely wrong! As a consequence, the variables are not set correctly, and the environment becomes inconsistent, making it impossible to build aplications.
Could anybody please tell me what's wrong here? Did I miss some option? ("Duplicate CMD.EXE bugs" is turned on.) Or is it a bug of TCC/LE?
Code:
IF "x%TARGET_CPU%x"=="xx" (
IF /I "%PROCESSOR_ARCHITECTURE%"=="x86" SET "TARGET_CPU=x86" & SET "CURRENT_CPU=x86"
IF /I "%PROCESSOR_ARCHITEW6432%"=="x86" SET "TARGET_CPU=x86" & SET "CURRENT_CPU=x86"
IF /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" SET "TARGET_CPU=x64" & SET "CURRENT_CPU=x64"
rem ...and some more similar lines...
GOTO Parse_Args
)
When I turned on printing of commands I saw that TCC/LE combined all of the lines within the command group in parentheses with the "&" operator, so that it looked like follows:
Code:
IF "x%TARGET_CPU%x"=="xx" (
IF /I "%PROCESSOR_ARCHITECTURE%"=="x86" SET "TARGET_CPU=x86" & SET "CURRENT_CPU=x86" &
IF /I "%PROCESSOR_ARCHITEW6432%"=="x86" SET "TARGET_CPU=x86" & SET "CURRENT_CPU=x86" &
IF /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" SET "TARGET_CPU=x64" & SET "CURRENT_CPU=x64" &
...
Could anybody please tell me what's wrong here? Did I miss some option? ("Duplicate CMD.EXE bugs" is turned on.) Or is it a bug of TCC/LE?