Skip to content

DI: Don't emit explicit alignment for pointer types#3868

Merged
kinke merged 1 commit intoldc-developers:masterfrom
kinke:di_ptr
Feb 26, 2022
Merged

DI: Don't emit explicit alignment for pointer types#3868
kinke merged 1 commit intoldc-developers:masterfrom
kinke:di_ptr

Conversation

@kinke
Copy link
Copy Markdown
Member

@kinke kinke commented Nov 10, 2021

As clang doesn't seem to either. This might fix #3864.

As clang doesn't seem to either. This *might* fix ldc-developers#3864.
@thewilsonator
Copy link
Copy Markdown
Contributor

cc @schveiguy

@schveiguy
Copy link
Copy Markdown
Contributor

schveiguy commented Nov 20, 2021

Thanks, I'll try and test this, I've never built ldc2 from source. Is there a CI-built version I can download?

@kinke
Copy link
Copy Markdown
Member Author

kinke commented Nov 20, 2021

Is there a CI-built version

Yes, the Azure jobs publish artifacts that can be downloaded (hover => burger button appearing on the right-hand side): https://dev.azure.com/ldc-developers/ldc/_build/results?buildId=3176&view=artifacts&pathAsName=false&type=publishedArtifacts

@schveiguy
Copy link
Copy Markdown
Contributor

Thanks. I tried it, same linker error:

steves@MacBook-Pro testd % ~/Downloads/osx-arm64/ldc2-1c9ad89b-osx-arm64/bin/ldc2 -betterC -g testbadlink.d
ld: warning: pointer not aligned at address 0x100004032 (anon + 50 from testbadlink.o)
ld: unaligned pointer(s) for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: /usr/bin/cc failed with status: 1
steves@MacBook-Pro testd % cat testbadlink.d
extern(C) void main() {}

Same with release version.

@kinke kinke merged commit 4e06179 into ldc-developers:master Feb 26, 2022
@kinke kinke deleted the di_ptr branch February 26, 2022 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ldc2 with -g flag fails to link on Apple M1 Pro (aarch64) with unaligned pointer

3 participants