Allow specifying a separate tool for assembling .s/.S files
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
Normally, .s/.S assembly files are compiled with the same compiler as C files.
For cases when there is assembly in .s/.S files (often the case for ARM) but the main C compiler is MSVC, the C compiler itself can't handle those source files. (Or in some cases, such as slightly older versions of Xcode, the C compiler can handle .s/.S files in general but not all the features used in the assembly files within the current project.)
For these cases, it would be useful to be able to specify a separate compiler tool (via the cross file?) that will take care of the .s/.S files. If not specified, the default C compiler would be used for it.
For the case of ARM assembly files, that tool can either be https://github.com/libav/gas-preprocessor (which preprocesses the gas source, expands all the macros and passes it to MS armasm[64].exe) or clang.
AFAIK, right now the only way of achieving this is to treat the .S files as a custom generator.
Contributor guide
Research direction
Start by tracing how Meson selects the compiler for .s/.S files and how cross files configure compiler tools. Define the separate assembly-tool setting, preserve the default C-compiler fallback, and verify the behavior for MSVC with ARM assembly and for clang or gas-preprocessor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100