On 3/17/15 3:19 PM, Steve King wrote:> Doesn't count for much, but I'm sympathetic to Dario's concern with > cl::opt and clang defaults. In one large out-of-tree project, > colleagues decided to create their own driver to handle the required > customization of the build process and options. > > If clang is the user's one stop shop, here's one such cross compiler > example I'd like to understand better: GNU binutils has no clue of my > target. Instead of trying to use gas, how should GNU-less targets > enable clang invoke llvm-mc to assemble? >-fintegrated-as / -fno-integrated-as>-- Jon Roelofs jonathan at codesourcery.com CodeSourcery / Mentor Embedded
>> If clang is the user's one stop shop, here's one such cross compiler >> example I'd like to understand better: GNU binutils has no clue of my >> target. Instead of trying to use gas, how should GNU-less targets >> enable clang invoke llvm-mc to assemble? >> > -fintegrated-as / -fno-integrated-asI tried, but integrated-as was impractical due to too many possible machine code matches for a given assembly statement. So, the compiler deals in pseudos and emits .s files. If the integrated assembler could accept an assembly string instead of an mcinst, I'd be in business. Regardless, users could pass .s files on the command line and Clang would still need to call llvm-mc with the right options.
On 3/17/15 4:00 PM, Steve King wrote:>>> If clang is the user's one stop shop, here's one such cross compiler >>> example I'd like to understand better: GNU binutils has no clue of my >>> target. Instead of trying to use gas, how should GNU-less targets >>> enable clang invoke llvm-mc to assemble? >>> >> -fintegrated-as / -fno-integrated-as > > I tried, but integrated-as was impractical due to too many possible > machine code matches for a given assembly statement. So, the compiler > deals in pseudos and emits .s files. If the integrated assembler > could accept an assembly string instead of an mcinst, I'd be in > business.Which arch is this?> > Regardless, users could pass .s files on the command line and Clang > would still need to call llvm-mc with the right options.That's sort of what `clang -cc1as` does already when you do: `clang foo.s -integrated-as`. -- Jon Roelofs jonathan at codesourcery.com CodeSourcery / Mentor Embedded
On Tue, Mar 17, 2015 at 3:00 PM, Steve King <steve at metrokings.com> wrote:> >> If clang is the user's one stop shop, here's one such cross compiler > >> example I'd like to understand better: GNU binutils has no clue of my > >> target. Instead of trying to use gas, how should GNU-less targets > >> enable clang invoke llvm-mc to assemble? > >> > > -fintegrated-as / -fno-integrated-as > > I tried, but integrated-as was impractical due to too many possible > machine code matches for a given assembly statement. So, the compiler > deals in pseudos and emits .s files. If the integrated assembler > could accept an assembly string instead of an mcinst, I'd be in > business. > > Regardless, users could pass .s files on the command line and Clang > would still need to call llvm-mc with the right options.Clang already does this without invoking llvm-mc. It invokes 'clang -cc1as' which performs the same function. Try it. :) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150317/d8ea4286/attachment.html>
Joerg Sonnenberger
2015-Mar-17 22:21 UTC
[LLVMdev] Target-specific defaults for LLVM tools?
On Tue, Mar 17, 2015 at 03:00:48PM -0700, Steve King wrote:> >> If clang is the user's one stop shop, here's one such cross compiler > >> example I'd like to understand better: GNU binutils has no clue of my > >> target. Instead of trying to use gas, how should GNU-less targets > >> enable clang invoke llvm-mc to assemble? > >> > > -fintegrated-as / -fno-integrated-as > > I tried, but integrated-as was impractical due to too many possible > machine code matches for a given assembly statement. So, the compiler > deals in pseudos and emits .s files. If the integrated assembler > could accept an assembly string instead of an mcinst, I'd be in > business. > > Regardless, users could pass .s files on the command line and Clang > would still need to call llvm-mc with the right options.You don't make sense to me. IAS uses the same parser as llvm-mc. Joerg
Maybe Matching Threads
- [LLVMdev] Target-specific defaults for LLVM tools?
- [LLVMdev] Target-specific defaults for LLVM tools?
- [LLVMdev] Target-specific defaults for LLVM tools?
- clang invokes assembler when generating obj file?
- [libunwind][Mips] Problem using gas to assemble UnwindRegistersSave.S