-
Notifications
You must be signed in to change notification settings - Fork 31
[cpullvm] Add basic information about multilib #255
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,3 +24,30 @@ supported include: | |
| * RTTI | ||
|
|
||
| If variants with exceptions and RTTI enabled are required, please file an issue. | ||
|
|
||
| ## Multilib | ||
| CPULLVM automatically selects a set of headers and runtime libraries to use when compiling and linking based on | ||
| the set of arguments passed on the command line. A warning will be emitted if no appropriate set of headers/libraries | ||
| can be found. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can the warning be suppressed if build has to be clean of warnings, please indicate how
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It works the same as any other warning. I'm hesitant to put it here--people should not be disabling this unless they know what they're up to, at which point they should be able to figure out how to turn the warning off.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this might be information useful in the migration guide - please if you do not want to add it here, share it with CE team |
||
|
|
||
| When compiling and linking, you should provide at least the following options on the command line: | ||
| * The target triple (ex: `--target=riscv32-unknown-elf`) | ||
| * `-march`, `-mabi`, and `-mfpu`, if using non-default options and applicable to your target | ||
| * Whether to use position independent code | ||
| * Any additional options like sanitizers or `-mbranch-protection` | ||
|
|
||
| Additionally, CPULLVM implements custom multilib flags to allow selecting variants that are not otherwise tied | ||
| to normal compiler flags. These are specified by `-fmultilib-flag=<flag>`. Currently implemented flags include: | ||
| * **`threads`/`nothreads`**: Picolibc only. When `threads` is set, a variant with [`thread-local-storage`](https://github.com/picolibc/picolibc/blob/ce4e736ebef081d13a81a29b6cfb51335f6f890d/doc/build.md#thread-local-storage-options) enabled, | ||
| [`single-thread`](https://github.com/picolibc/picolibc/blob/ce4e736ebef081d13a81a29b6cfb51335f6f890d/doc/build.md#locking-options) disabled, | ||
| and [`atomic-ungetc`](https://github.com/picolibc/picolibc/blob/ce4e736ebef081d13a81a29b6cfb51335f6f890d/doc/build.md#locking-options) enabled is selected. `nothreads` selects a variant with the inverse. `threads` is default. | ||
|
|
||
|
jonathonpenix marked this conversation as resolved.
|
||
| To display all available multilibs run clang with the flag `-print-multi-lib` and an appropriate target triple. | ||
|
|
||
| To display the directory selected by the multilib system, add the flag `-print-multi-directory` to your clang command line options. | ||
|
|
||
| > [!WARNING] | ||
| > Using `--sysroot` to select a variant or hardcoding paths to variants should generally not be done. | ||
| > Please file an issue if you find that this is needed. | ||
| > | ||
| > Variant names and paths may change at any time without notice. | ||
Uh oh!
There was an error while loading. Please reload this page.