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
Specialize the build for some expensive components for Arch & Debian. #1713
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shellcheck found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1713 +/- ##
==========================================
+ Coverage 69.57% 70.19% +0.62%
==========================================
Files 159 162 +3
Lines 18775 19405 +630
Branches 4503 4634 +131
==========================================
+ Hits 13062 13622 +560
- Misses 3723 3744 +21
- Partials 1990 2039 +49 |
@sp1ff thanks for the PR. |
dc978dd
to
8b44143
Compare
I believe the spellcheck warnings to be spurious; since the build scripts are sourced into the master script, they define variables that are intended to be used there, rather than locally. |
@jamacku Is it possible to provide the used shall globally?
|
@MartinNowack You can either mask the error message or globally set the shell used in your scripts. I'll prepare PR. |
- set default shell to bash #1713 (comment)
This patch adds files p-{clang,llvm,libcxx}-linux-debian.inc; this will greatly speed-up Debian & Arch builds when LLVM has been installed via the distribution-specific packages. Remove the extra "lib*" directory level in `install_libcxx()` when building form LLVM version < 14. At least on Debian, using LLVM 13.0 from the apt repos, this doesn't exist & breaks bitcode extraction.
8b44143
to
49cdb09
Compare
bin_path="$(dirname "$(readlink -f "${bin_path}")")" | ||
[[ -z "${bin_path}" ]] && return 1 | ||
|
||
BITCODE_CC="${bin_path}/clang" |
Check warning
Code scanning / shellcheck
BITCODE_CC appears unused. Verify use (or export if used externally). Warning
[[ -z "${bin_path}" ]] && return 1 | ||
|
||
BITCODE_CC="${bin_path}/clang" | ||
BITCODE_CXX="${bin_path}/clang++" |
Check warning
Code scanning / shellcheck
BITCODE_CXX appears unused. Verify use (or export if used externally). Warning
bin_path="$(dirname "$(readlink -f "${bin_path}")")" | ||
[[ -z "${bin_path}" ]] && return 1 | ||
|
||
BITCODE_CC="${bin_path}/clang" |
Check warning
Code scanning / shellcheck
BITCODE_CC appears unused. Verify use (or export if used externally). Warning
[[ -z "${bin_path}" ]] && return 1 | ||
|
||
BITCODE_CC="${bin_path}/clang" | ||
BITCODE_CXX="${bin_path}/clang++" |
Check warning
Code scanning / shellcheck
BITCODE_CXX appears unused. Verify use (or export if used externally). Warning
|
||
check_llvm_config_version() { | ||
local check_mode=1 | ||
strict_mode="$1" # if llvm-config should be checked strictly |
Check warning
Code scanning / shellcheck
strict_mode appears unused. Verify use (or export if used externally). Warning
[[ $(to_bool "${DISABLE_ASSERTIONS}") -ne $(to_bool "${assertion}") ]] || return 1 | ||
|
||
local shared_mode | ||
shared_mode="$(${lc} --shared-mode)" || return 1 |
Check warning
Code scanning / shellcheck
shared_mode appears unused. Verify use (or export if used externally). Warning
is_ins=$(check_llvm_config_version 1 "${lc}") || return 1 | ||
fi | ||
|
||
LLVM_CONFIG="${lc}" |
Check warning
Code scanning / shellcheck
LLVM_CONFIG appears unused. Verify use (or export if used externally). Warning
fi | ||
|
||
LLVM_CONFIG="${lc}" | ||
LLVM_INSTALL="$(${lc} --prefix)" |
Check warning
Code scanning / shellcheck
LLVM_INSTALL appears unused. Verify use (or export if used externally). Warning
LLVM_CONFIG="${lc}" | ||
LLVM_INSTALL="$(${lc} --prefix)" | ||
LLVM_BIN="$(${lc} --bindir)" | ||
BITCODE_CC="${LLVM_BIN}/clang" |
Check warning
Code scanning / shellcheck
BITCODE_CC appears unused. Verify use (or export if used externally). Warning
LLVM_INSTALL="$(${lc} --prefix)" | ||
LLVM_BIN="$(${lc} --bindir)" | ||
BITCODE_CC="${LLVM_BIN}/clang" | ||
BITCODE_CXX="${LLVM_BIN}/clang++" |
Check warning
Code scanning / shellcheck
BITCODE_CXX appears unused. Verify use (or export if used externally). Warning
@MartinNowack Sorry, missed this. Re-based. TBH the warnings RE Beyond that, I'm a bit confused-- all of the |
It is because of Differential ShellCheck GHA. It performs differential ShellCheck scans (base and additions) and reports only newly introduced defects. You don't have to use ShellCheck directives to mute the suggestions/warnings. However, maintainers have access to all warnings in the Security tab on GitHub. You don't have to fix/mute all defects before introducing ShellCheck to your project. |
Summary:
This patch adds files
p-{clang,llvm,libcxx}-linux-debian.inc
; this will greatly speed-up Debian & Arch builds when LLVM has been installed via the distribution-specific packages.Remove the extra "lib*" directory level in
install_libcxx()
when building form LLVM version < 14. At least on Debian, using LLVM 13.0 from the apt repos, this doesn't exist & breaks bitcode extraction.Checklist:
Note to reviewers: I believe the "SpellCheck" errors to be spurious.