This repository was archived by the owner on Apr 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ setup_variables() {
9
9
" -c" |" --clean" ) cleanup=true ;;
10
10
" -j" |" --jobs" ) shift ; jobs=$1 ;;
11
11
" -j" * ) jobs=${1/ -j} ;;
12
+ " --lto" ) disable_lto=false ;;
12
13
" -h" |" --help" )
13
14
cat usage.txt
14
15
exit 0 ;;
@@ -269,6 +270,8 @@ build_linux() {
269
270
[[ $ARCH != " x86_64" ]] && cat ../configs/tt.config >> .config
270
271
# Disable ftrace on arm32: https://github.com/ClangBuiltLinux/linux/issues/35
271
272
[[ $ARCH == " arm" ]] && ./scripts/config -d CONFIG_FTRACE
273
+ # Disable LTO and CFI unless explicitly requested
274
+ ${disable_lto:= true} && ./scripts/config -d CONFIG_LTO -d CONFIG_LTO_CLANG
272
275
fi
273
276
# Make sure we build with CONFIG_DEBUG_SECTION_MISMATCH so that the
274
277
# full warning gets printed and we can file and fix it properly.
Original file line number Diff line number Diff line change @@ -42,3 +42,7 @@ Optional parameters:
42
42
-j | --jobs
43
43
Pass this value to make. The script will use all cores by default but
44
44
this isn't always the best value.
45
+ --lto
46
+ By default, the script turns off LTO/CFI for quicker build times. If
47
+ your machine can handle the more intensive compile, pass this flag
48
+ to avoid attempting to disable it. This does not enable LTO explicitly.
You can’t perform that action at this time.
0 commit comments