revert-795c8762b16b.patch
branchfirefox81
changeset 1144 8a43aff7e982
equal deleted inserted replaced
1143:ff28137410eb 1144:8a43aff7e982
       
     1 diff --git a/build/moz.configure/lto-pgo.configure b/build/moz.configure/lto-pgo.configure
       
     2 --- a/build/moz.configure/lto-pgo.configure
       
     3 +++ b/build/moz.configure/lto-pgo.configure
       
     4 @@ -224,17 +224,20 @@ def lto(value, c_compiler, ld64_known_go
       
     5              #
       
     6              # https://github.com/llvm/llvm-project/blob/e7694f34ab6a12b8bb480cbfcb396d0a64fe965f/llvm/lib/Target/X86/X86.td#L1165-L1187
       
     7              if target.cpu == 'x86_64':
       
     8                  ldflags.append('-mllvm:-mcpu=x86-64')
       
     9              # We do not need special flags for arm64.  Hooray for fixed-length
       
    10              # instruction sets.
       
    11          else:
       
    12              num_cores = multiprocessing.cpu_count()
       
    13 -            cflags.append("-flto")
       
    14 +            if len(value) and value[0].lower() == 'full':
       
    15 +                cflags.append("-flto")
       
    16 +            else:
       
    17 +                cflags.append("-flto=thin")
       
    18              cflags.append("-flifetime-dse=1")
       
    19  
       
    20              ldflags.append("-flto=%s" % num_cores)
       
    21              ldflags.append("-flifetime-dse=1")
       
    22  
       
    23          # Tell LTO not to inline functions above a certain size, to mitigate
       
    24          # binary size growth while still getting good performance.
       
    25          # (For hot functions, PGO will put a multiplier on this limit.)