Skip to content

builder: update configuration to support Arch Linux LLVM 13 installation#2498

Merged
deadprogram merged 2 commits intotinygo-org:devfrom
niaow:llvm13-arch
Jan 9, 2022
Merged

builder: update configuration to support Arch Linux LLVM 13 installation#2498
deadprogram merged 2 commits intotinygo-org:devfrom
niaow:llvm13-arch

Conversation

@niaow
Copy link
Copy Markdown
Member

@niaow niaow commented Jan 8, 2022

This PR makes two changes which make TinyGo work with the default installed LLVM/clang on Arch:

  1. Adds -fno-stack-protector to musl - it is on by default on Arch, which causes TLS to be used before initialization
  2. Updates the clang headers search path to handle the differences in installation paths

@deadprogram
Copy link
Copy Markdown
Member

The CI fail should be fixed by a rebase against llvm13 branch, which now has been rebased against dev.

@deadprogram deadprogram changed the base branch from llvm13 to dev January 9, 2022 10:04
@deadprogram
Copy link
Copy Markdown
Member

I already changed the base branch for this PR to dev so now it should just need a rebase to pass CI.

niaow added 2 commits January 9, 2022 08:52
Arch Linux has turned on the stack protector by default.
This causes a crash in libc init because the stack protector uses TLS before it is initialized.
Arch Linux stores the clang executable seperately from its data, so the search based on the executable does not work.
This change searches /usr/lib as a backup.
@niaow
Copy link
Copy Markdown
Member Author

niaow commented Jan 9, 2022

Ugh, macos just seems to be timing out repeatedly.

@deadprogram
Copy link
Copy Markdown
Member

I think I will merge anyway, and see if the dev branch will have better luck on the macOS build.

Thanks @niaow

@deadprogram deadprogram merged commit cb01d4d into tinygo-org:dev Jan 9, 2022
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.

2 participants