fix: add target datalayout and triple to IR
Adds target data-layout and target triple to generated IR. This ensures consistent alignment for both generated code and debug information. Note that this breaks our snapshots for windows builds:
2 │-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3 │-target triple = "x86_64-pc-linux-gnu"
2 │+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3 │+target triple = "x86_64-pc-windows-msvc"
Omitting the triple does not fix this issue, since the datalayout is not identical for linux and windows either.
This commit changes ALL codegen snapshots, so the snapshot updates are separated into their own commits. It also removes the previously added special handling for struct debug types since we can now rely on the preferred alignment of LLVM.
Codecov Report
Attention: Patch coverage is 84.61538% with 14 lines in your changes missing coverage. Please review.
Project coverage is 94.11%. Comparing base (
e731987) to head (d29607e). Report is 117 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| compiler/plc_driver/src/pipelines.rs | 66.66% | 14 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #1472 +/- ##
==========================================
+ Coverage 93.67% 94.11% +0.44%
==========================================
Files 166 174 +8
Lines 50097 56771 +6674
==========================================
+ Hits 46928 53430 +6502
- Misses 3169 3341 +172
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.