mirror of
https://github.com/vlang/v.git
synced 2025-09-16 10:57:25 -04:00
cbuilder: remove flto with parallel-cc, it slowed down linking 10x
This commit is contained in:
parent
eb74422773
commit
a8484387cb
@ -75,8 +75,9 @@ fn parallel_cc(mut b builder.Builder, result c.GenOutput) {
|
||||
for i in 0 .. c_files {
|
||||
o_postfixes << (i + 1).str()
|
||||
}
|
||||
str_args := b.str_args.replace('-flto', '') // remove link time optimization, slows down linking 10x
|
||||
for postfix in o_postfixes {
|
||||
cmds << '${cc} ${cc_cflags} ${cc_cflags_opt} ${b.str_args} -c -w -o out_${postfix}.o out_${postfix}.c'
|
||||
cmds << '${cc} ${cc_cflags} ${cc_cflags_opt} ${str_args} -c -w -o out_${postfix}.o out_${postfix}.c'
|
||||
}
|
||||
sw := time.new_stopwatch()
|
||||
mut pp := pool.new_pool_processor(callback: build_parallel_o_cb)
|
||||
|
Loading…
x
Reference in New Issue
Block a user