mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Disable Xtensa target by default, enabled with -DXTENSA_ENABLE (#2586)
Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
@@ -172,6 +172,7 @@ The compiler is currently verified to compile on Linux, OpenBSD, Windows and Mac
|
||||
| ELF freestanding Aarch64 | No | Untested | No | No | No | Yes* |
|
||||
| ELF freestanding Riscv64 | No | Untested | No | No | No | Untested |
|
||||
| ELF freestanding Riscv32 | No | Untested | No | No | No | Untested |
|
||||
| ELF freestanding Xtensa* | No | Untested | No | No | No | Untested |
|
||||
| FreeBSD x86 | Untested | Untested | No | Yes | Untested | Yes* |
|
||||
| FreeBSD x64 | Untested | Untested | No | Yes | Untested | Yes* |
|
||||
| NetBSD x86 | Untested | Untested | No | Yes | Untested | Yes* |
|
||||
@@ -184,7 +185,8 @@ The compiler is currently verified to compile on Linux, OpenBSD, Windows and Mac
|
||||
|
||||
*\* Inline asm is still a work in progress*<br>
|
||||
*\* OpenBSD 7.7 is the only tested version*<br>
|
||||
*\* OpenBSD has limited stacktrace, needs to be tested further*
|
||||
*\* OpenBSD has limited stacktrace, needs to be tested further*<br>
|
||||
*\* Xtensa support is enabled by compiling with `-DXTENSA_ENABLE`. The [espressif llvm fork](https://github.com/espressif/llvm-project) is recommended for best compatibility*
|
||||
|
||||
More platforms will be supported in the future.
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
- Support `@param` directives for `...` parameters. #2578
|
||||
- Allow splatting of structs. #2555
|
||||
- Deprecate `--test-nocapture` in favour of `--test-show-output` #2588.
|
||||
- Xtensa target no longer enabled by default on LLVM 22, Compile with `-DXTENSA_ENABLE` to enable it instead
|
||||
|
||||
### Fixes
|
||||
- `Foo.is_eq` would return false if the type was a `typedef` and had an overload, but the underlying type was not comparable.
|
||||
|
||||
@@ -1910,12 +1910,6 @@ INLINE const char *llvm_macos_target_triple(const char *triple)
|
||||
LLVMInitialize ## X ## TargetMC(); \
|
||||
} while(0)
|
||||
|
||||
#if LLVM_VERSION_MAJOR > 21
|
||||
#define XTENSA_AVAILABLE 1
|
||||
#else
|
||||
#define XTENSA_AVAILABLE 0
|
||||
#endif
|
||||
|
||||
void *llvm_target_machine_create(void)
|
||||
{
|
||||
static bool llvm_initialized = false;
|
||||
@@ -1923,11 +1917,9 @@ void *llvm_target_machine_create(void)
|
||||
if (!llvm_initialized)
|
||||
{
|
||||
llvm_initialized = true;
|
||||
#if XTENSA_AVAILABLE
|
||||
#ifndef XTENSA_DISABLE
|
||||
#ifdef XTENSA_ENABLE
|
||||
INITIALIZE_TARGET(Xtensa);
|
||||
#endif
|
||||
#endif
|
||||
#ifndef ARM_DISABLE
|
||||
INITIALIZE_TARGET(ARM);
|
||||
#endif
|
||||
@@ -1982,10 +1974,6 @@ void *llvm_target_machine_create(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define XTENSA_AVAILABLE 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2144,10 +2132,12 @@ void target_setup(BuildTarget *target)
|
||||
error_exit("Failed to find Windows def file: '%s' in path.", target->win.def);
|
||||
}
|
||||
|
||||
if (target->arch_os_target == ELF_XTENSA && !XTENSA_AVAILABLE)
|
||||
#ifndef XTENSA_ENABLE
|
||||
if (target->arch_os_target == ELF_XTENSA)
|
||||
{
|
||||
error_exit("Xtensa support is not available with this LLVM version.");
|
||||
}
|
||||
#endif
|
||||
|
||||
compiler.platform.target_triple = arch_to_target_triple[target->arch_os_target];
|
||||
ASSERT(compiler.platform.target_triple);
|
||||
|
||||
Reference in New Issue
Block a user