rust-osdev / x86_64

Library to program x86_64 hardware.
https://docs.rs/x86_64
Apache License 2.0
797 stars 132 forks source link

CI: Set `-Crelocation-model=static` in `RUSTFLAGS` for bootloader test job #480

Closed phil-opp closed 7 months ago

phil-opp commented 7 months ago

In d3b9c0573800b2e888486037e09d43ffd3ffcb97, we switched our test framework to the built-in x86_64-unknown-none target. This required a -Crelocation-model=static flag to work with bootloader v0.9, which we set using a build.rustflags config key.

In 2eb838d101cdd179d6395f79f87916a48e8c1935, we set a RUSTFLAGS env variable on CI to deny warnings.

Unfortunately, the above two commits conflict because the RUSTFLAGS env variable takes precedence over the build.rustflags key. This commit fixes this by setting an explicit RUSTFLAGS value for the bootloader test job that contains both flags.

This should fix the CI build errors.

phil-opp commented 7 months ago

Enabling merge queues is a good idea! However, the "Bootloader Integration Test" job is not marked as required, so merge queues wouldn't have helped here.

The reason for keeping the bootloader integration test jobs optional is to avoid deadlock situations on nightly breakage. There is a circular dependency because the bootloader crate depends on x86_64, which uses bootloader again for testing. So in case of nightly breakage we need to be able to fix x86_64 first.

mkroening commented 7 months ago

Ah, that makes sense. :)