Skip to content

headers: optionalise some generated resource headers #3526

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

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Nov 9, 2021

This splits out the generated headers and conditonalises them upon the
target being enabled.

The motivation here is that the RISCV header alone added 10MB to the
resource directory, which was previously at 10MB, increasing the build
size and time. This header is contributing ~50% of the size of the
resource headers (~10MB).

The ARM generated headers are contributing about ~10% or 1MB.

This could be extended further adding only the static resource headers
for the targets that the LLVM build supports.

The changes to the tests for ARM mirror what the RISCV target already
did and rnk identified as a possible issue.

Testing:
cmake -G Ninja -D LLVM_TARGETS_TO_BUILD=X86 -D LLVM_ENABLE_PROJECTS="clang;lld" ../clang
ninja check-clang

Differential Revision: https://reviews.llvm.org/D112890
Reviewed By: craig.topper

(cherry picked from commit c17d9b4)

This splits out the generated headers and conditonalises them upon the
target being enabled.

The motivation here is that the RISCV header alone added 10MB to the
resource directory, which was previously at 10MB, increasing the build
size and time. This header is contributing ~50% of the size of the
resource headers (~10MB).

The ARM generated headers are contributing about ~10% or 1MB.

This could be extended further adding only the static resource headers
for the targets that the LLVM build supports.

The changes to the tests for ARM mirror what the RISCV target already
did and rnk identified as a possible issue.

Testing:
  cmake -G Ninja -D LLVM_TARGETS_TO_BUILD=X86 -D LLVM_ENABLE_PROJECTS="clang;lld" ../clang
  ninja check-clang

Differential Revision: https://reviews.llvm.org/D112890
Reviewed By: craig.topper

(cherry picked from commit c17d9b4)
@compnerd
Copy link
Member Author

compnerd commented Nov 9, 2021

CC: @ahatanaka @etcwilde

@compnerd
Copy link
Member Author

compnerd commented Nov 9, 2021

@swift-ci please test

These do not seem to be needed upstream, but mark these tests as
requiring either ARM or ARM64 enabled which will generate the resource
headers.
@compnerd
Copy link
Member Author

compnerd commented Nov 9, 2021

@swift-ci please test

@compnerd compnerd merged commit e22643a into swiftlang:stable/20210726 Nov 10, 2021
@compnerd compnerd deleted the D112890 branch November 10, 2021 16:06
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.

1 participant