Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build in 2 stages #6

Closed
wants to merge 3 commits into from
Closed

build in 2 stages #6

wants to merge 3 commits into from

Conversation

abderrahim
Copy link
Contributor

Not sure this is correct, but I hope it is.

@flathubbot
Copy link

Started test build 54643

@flathubbot
Copy link

Build 54643 failed

@flathubbot
Copy link

Started test build 54667

@flathubbot
Copy link

Build 54667 failed

@flathubbot
Copy link

Started test build 54677

@flathubbot
Copy link

Build 54677 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/52624/org.freedesktop.Sdk.Extension.llvm12.flatpakref

Copy link
Collaborator

@Erick555 Erick555 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this cleans all files from stage2 that exist also in stage1 and in the result not much is left there. I think we need to differentiate install path for stage1.

"config-opts": [
"-DFFI_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/libffi-3.2.1/include",
"-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu",
"-DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;NVPTX'"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can leave only X86 here and drop the rest.

"-DLLVM_ENABLE_PROJECTS='clang;compiler-rt;lld'",
"-DLLVM_ENABLE_ASSERTIONS:BOOL=OFF",
"-DBUILD_SHARED_LIBS:BOOL=OFF",
"-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can disable all DYLIB options in stage1 as we don't care about size there

@Erick555
Copy link
Collaborator

Erick555 commented Jul 29, 2021

I get it almost working here except it refuses to build sanitizers in final stage while in stage1 it builds them just fine. Something screws up feature autodetection and I ran out of ideas about how to fix it.

@Erick555
Copy link
Collaborator

Erick555 commented Aug 1, 2021

I figured it out. This was caused by LLVM_BUILD_EXTERNAL_COMPILER_RT for which I couldn't find any rationale to be used except fedora has it (but other distros doesn't). Anyway 2stage build was merged through #7

@Erick555 Erick555 closed this Aug 1, 2021
@Erick555
Copy link
Collaborator

Erick555 commented Aug 3, 2021

Extension size is now ~330M for x86 and ~300 for aarch64.

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.

None yet

3 participants