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

Expose tool pass-through mechanisms #4

Open
woodruffw opened this issue Jun 26, 2020 · 1 comment
Open

Expose tool pass-through mechanisms #4

woodruffw opened this issue Jun 26, 2020 · 1 comment
Assignees
Labels
C:core Blight's core classes and interfaces

Comments

@woodruffw
Copy link
Member

The CompilerTool class should detect the tool pass-through mechanisms used by both Clang and GCC and expose them as appropriate.

Some examples:

  • Assembler passthrough: -Wa -flag1,-flag2,-flag3 should be exposed as assembler_args
  • Linker passthrough: -Wl -flag1,-flag2,-flag2 should be exposed as linker_args
  • Preprocessor passthroughL: -Wp -flag1,-flag2,-flag2 should be exposed as preprocessor_args

Notes:

  • These pass-through mechanisms also support a no-space form like -Wa,-flag1, so this also needs to be handled.
  • -Xassembler, -Xlinker, and -Xpreprocessor each behave the same as their -W counterparts above, although they don't appear to support the no-space form.
  • Clang also supports -Xanalyzer, for the Clang-specific analyzer and -Xclang for passing options to cc1.
  • Clang also supports -mllvm for forwarding LLVM-specific arguments. This form appears to only take one argument at a time.
  • Clang also supports --for-linker <arg> and --for-linker=<arg> as equivalents to -Xlinker <arg>. -X <arg> might also be equivalent.
@woodruffw woodruffw self-assigned this Jun 26, 2020
@woodruffw woodruffw added the C:core Blight's core classes and interfaces label Jun 29, 2020
@woodruffw
Copy link
Member Author

We should also support linker groups for CompileTools, since apparently they can embed source inputs and not just objects: SRI-CSL/gllvm#48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:core Blight's core classes and interfaces
Projects
None yet
Development

No branches or pull requests

1 participant