Introduce a TargetFrontendConfig type. (#570)
* Introduce a `TargetFrontendConfig` type. `TargetFrontendConfig` is information specific to the target which is provided to frontends to allow them to produce Cranelift IR for the target. Currently this includes the pointer size and the default calling convention. The default calling convention is now inferred from the target, rather than being a setting. cranelift-native is now just a provider of target information, rather than also being a provider of settings, which gives it a clearer role. And instead of having cranelift-frontend routines require the whole `TargetIsa`, just require the `TargetFrontendConfig`, and add a way to get the `TargetFrontendConfig` from a `Module`. Fixes #529. Fixes #555.
This commit is contained in:
@@ -27,30 +27,6 @@ enable_verifier = BoolSetting(
|
||||
""",
|
||||
default=True)
|
||||
|
||||
call_conv = EnumSetting(
|
||||
"""
|
||||
Default calling convention:
|
||||
|
||||
- fast: not-ABI-stable convention for best performance
|
||||
- cold: not-ABI-stable convention for infrequently executed code
|
||||
- system_v: System V-style convention used on many platforms
|
||||
- windows_fastcall: Windows "fastcall" convention, also used for
|
||||
x64 and ARM
|
||||
- baldrdash: SpiderMonkey WebAssembly convention
|
||||
- probestack: specialized convention for the probestack function
|
||||
|
||||
The default calling convention may be overridden by individual
|
||||
functions.
|
||||
""",
|
||||
|
||||
'fast',
|
||||
'cold',
|
||||
'system_v',
|
||||
'windows_fastcall',
|
||||
'baldrdash',
|
||||
'probestack'
|
||||
)
|
||||
|
||||
# Note that Cranelift doesn't currently need an is_pie flag, because PIE is
|
||||
# just PIC where symbols can't be pre-empted, which can be expressed with the
|
||||
# `colocated` flag on external functions and global values.
|
||||
|
||||
Reference in New Issue
Block a user