Enforce single module compilation for static libraries to make constructors run properly.

This commit is contained in:
Christoffer Lerno
2024-11-30 15:34:48 +01:00
parent a0f4976b07
commit b5e5c719ed
2 changed files with 2 additions and 0 deletions

View File

@@ -28,6 +28,7 @@
- Contracts on generic modules would evaluate too late, sometimes not catching the error until it already occurred elsewhere.
- Fix bug preventing optionals from being used in ranges or as indices.
- Crash compiling for arm64 when returning 16 byte and smaller structs by value not a power of 2 #1649.
- Enforce single module compilation for static libraries to make constructors run properly.
### Stdlib changes
- Add `io::MultiReader`, `io::MultiWriter`, and `io::TeeReader` structs.

View File

@@ -297,6 +297,7 @@ static void update_build_target_from_options(BuildTarget *target, BuildOptions *
break;
case COMMAND_STATIC_LIB:
target->type = TARGET_TYPE_STATIC_LIB;
target->single_module = true;
break;
default:
target->run_after_compile = false;