Replies: 5 comments 4 replies
-
If you're using gcc/clang it should just work if you add .S files into the sources of a target. What error do you get if you do that? |
Beta Was this translation helpful? Give feedback.
-
@eli-schwartz, any suggestions? |
Beta Was this translation helpful? Give feedback.
-
I also tried to define a separate dependency with the two assembly files, and pass it to micro_os_plus_devices_cortexa_dependency:
This does not work either, because at the top level the compiler args are aggregated and all files are compiled with the |
Beta Was this translation helpful? Give feedback.
-
According to the GNU documentation, all modern GCC do it (which is nice, since
That's a pity, since the reason why my build failed is a consequence of not giving enough attention to the details, like not having fully separate, per language, definitions. In this specific case it is the lack of separate definitions for assembly files, but in other cases also the distinction between C and C++ options may be inadequate (like in the dependency definition, where there is a single The reason why I had no problems building the same project with CMake is that the long list of warnings was not used by CMake in the assembly command line, and one of these warnings is harmful for assembly files ( To conclude, the ideal solution would be for meson to allow fully separate per language options, including for assembly, and to do this consistently everywhere, at the project level, in libraries, in dependencies, etc. |
Beta Was this translation helpful? Give feedback.
-
As of meson v1.2.3, there is still no way to define separate compiler flags for assembly files. :( |
Beta Was this translation helpful? Give feedback.
-
I'm trying to figure out how to add the rules to compile
.S
files to a project.The toolchains that I use require only adding
-x assembler-with-cpp
to the*-gcc
line, the rest is the same as for compiling.c
files.My current
meson.build
file for the library is:Unfortunately this does not work, the
.S
file is processed as a regular.c
file, which fails.Can someone suggest how to update the above definitions to add
-x assembler-with-cpp
for the assembly files?Please note that my library is actually only a dependency, not a static library, and if we add custom rules, they should be forwarded to the application level, where all dependencies are compiled.
Thank you,
Liviu
Beta Was this translation helpful? Give feedback.
All reactions