Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a method like cc.compiles for assembler #5151

Open
dcbaker opened this issue Mar 25, 2019 · 0 comments
Open

Need a method like cc.compiles for assembler #5151

dcbaker opened this issue Mar 25, 2019 · 0 comments

Comments

@dcbaker
Copy link
Member

dcbaker commented Mar 25, 2019

in pixman we want to do some assembler tests, and the input is raw assembly with c pre-processor macros. This can be made to work by writing the test to a .S file and then passing it in, but cannot be made to work (currently) using a string passed to compiler.compiles.

One way to go about doing this would be to add a assembly flag to the compiler object, but I'm not sure if that's the right way to solve it, since that relies on specific behavior of GCC/Clang, and notably doesn't work with MSVC. A better way might be do do something similar for assemblers to what I'm doing in #5148, splitting the assembler into a separate representation and allowing the user to ask for the assembler like another compiler, doing something like:

as = meson.get_compiler('assembler')
works = as.compiles(
    '''my . made:up
      assembly . code
    """)

related: #4366

@dcbaker dcbaker changed the title Need a way like cc.compiles for assembler Need a method like cc.compiles for assembler Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant