Skip to content

[Bug] parseCompilerArgs.bat fails if argument contains a space #755

@thefasquelle

Description

@thefasquelle

Brief Issue Summary

I have a makefile with this line :
-D'LFS_ASSERT(test)'='do { if(!(test)) {return -1;} } while(0)' \

The makefile works and makefile-tools is able to parse it and run make tasks.

But when configuring cpptools to use makefile-tools as a configuration provider, parseCompilerArgs.bat fails :

Error running the compiler args parser script c:\Users\ep.t.fasquelle\.vscode\extensions\ms-vscode.makefile-tools-0.12.17\assets\parseCompilerArgs.bat for regions (   -mcpuDONT_USE_EQUAL_AS_SEPARATORtc37xx -mtc162 -save-tempsDONT_USE_EQUAL_AS_SEPARATORobj              -ffunction-sections -fdata-sections -mpragma-data-sections -mpragma-function-sections -fstrict-volatile-bitfields -fgcse -fgcse-sm -fgcse-lm -fgcse-after-reload -ffast-math -funswitch-loops -fpredictive-commoning -fipa-cp-clone -fpeel-loops -fmove-loop-invariants -funroll-loops -finline-is-always-inline -Wall -Wextra -Wundef -Wshadow -Wdouble-promotion -Werror-implicit-function-declaration -Wuninitialized -Wno-missing-field-initializers -Wno-type-limits -fno-strict-aliasing -fno-builtin -fno-common -O0 -g3 -iquote -maligned-data-sections -Wmissing-prototypes -1;} } while(0)' -c -o  obj/Dal.o ../../SDK/DAL/Dal.c): ' �tait inattendu.

The compiler args parser script 'c:\Users\ep.t.fasquelle\.vscode\extensions\ms-vscode.makefile-tools-0.12.17\assets\parseCompilerArgs.bat' failed with error code    -mcpuDONT_USE_EQUAL_AS_SEPARATORtc37xx -mtc162 -save-tempsDONT_USE_EQUAL_AS_SEPARATORobj              -ffunction-sections -fdata-sections -mpragma-data-sections -mpragma-function-sections -fstrict-volatile-bitfields -fgcse -fgcse-sm -fgcse-lm -fgcse-after-reload -ffast-math -funswitch-loops -fpredictive-commoning -fipa-cp-clone -fpeel-loops -fmove-loop-invariants -funroll-loops -finline-is-always-inline -Wall -Wextra -Wundef -Wshadow -Wdouble-promotion -Werror-implicit-function-declaration -Wuninitialized -Wno-missing-field-initializers -Wno-type-limits -fno-strict-aliasing -fno-builtin -fno-common -O0 -g3 -iquote -maligned-data-sections -Wmissing-prototypes -1;} } while(0)' -c -o  obj/Dal.o ../../SDK/DAL/Dal.c for regions (undefined)
Sending configuration for file c:\Users\ep.t.fasquelle\Documents\dev\<censored>\SDK\DAL\Dal.c -----------------------------------

(I think ' �tait inattendu should be ' was unexpected here in English)

Debug Log

I believe the above should suffice and I would prefer not spend time sanitizing this very long output.
If you believe you really need the information from debug log I will do it.

Additional Information

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions