Compiling assembly files with different arguments #10497
-
Hello, I'm setting up a new build system that uses GCC as compiler, assembler, and linker. I'm using a cross_file.build to set up the general compilation flags for C files ( c_args) and linker (c_link_args). Do you know what should be the keyword for assembly flags? I'm also seeing that the command lines have extra flags from the one I defined, how can I force to only use the one defined in the cross-compilation file? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
asm |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot @eli-schwartz for your quick feedback! Please see below the command line to compile an assembly file with the build chain from ST - SPC5Studio
I tried adding the
Thanks a lot! Cross Compile file
|
Beta Was this translation helpful? Give feedback.
-
I think I misunderstood what you want... So you cannot pass -x via -Wa, because the point of -x is to decide whether to use -Wa. The More generally... why do you want to pass -x at all? Can't you just name your source files |
Beta Was this translation helpful? Give feedback.
I think I misunderstood what you want...
-Wa
says "pass this option to the assembler".-x
says "in the frontend, interpret this file as $language, in this case assembly, and invoke the assembler".So you cannot pass -x via -Wa, because the point of -x is to decide whether to use -Wa.
The
-x
option allows you to override the compiler's automatic detection of the language based on the file extension. It's utterly inappropriate to include in a cross file, because if it is correct to pass that option, it must be defined in meson.bu…