From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id D05A53858408; Wed, 25 Jan 2023 12:37:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D05A53858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674650254; bh=pMZ9OOabQz1/UuEq2uCGVT2KbYfskK8KjJcpzvcEgy8=; h=From:To:Subject:Date:From; b=QFhf1+ikFlWotiw5Gv9bPMYVvnf4aQXx/XFspMtI1lpfZvQY0fzREpUIjv2qxLz6s eXYCf/K8l5DVxF9QPEsvIT3s0fairuxZKBJTzPVAqS0/2REr77k60LRIqD6AXnUU6M he2nxTWLMCkJxw6k0qOWDinPMtUm9ymMTjdXX6ow= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5347] Fixup LTO internal docs for option processing X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: da43e287d1917a25594f95c7c519ded637c7ea50 X-Git-Newrev: 64f66385086e6a957c337eef97aec01cf30c162d Message-Id: <20230125123734.D05A53858408@sourceware.org> Date: Wed, 25 Jan 2023 12:37:34 +0000 (GMT) List-Id: https://gcc.gnu.org/g:64f66385086e6a957c337eef97aec01cf30c162d commit r13-5347-g64f66385086e6a957c337eef97aec01cf30c162d Author: Richard Biener Date: Wed Jan 25 13:28:01 2023 +0100 Fixup LTO internal docs for option processing Andreas noticed that when I removed lto_read_all_file_options I failed to update the internals manual which refers to it. The following attempts to reflect the current situation. * doc/lto.texi (Command line options): Reword and update reference to removed lto_read_all_file_options. Diff: --- gcc/doc/lto.texi | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gcc/doc/lto.texi b/gcc/doc/lto.texi index e591e8d2915..eb5f54bf908 100644 --- a/gcc/doc/lto.texi +++ b/gcc/doc/lto.texi @@ -170,13 +170,11 @@ object files. This is used at link time to determine the optimization level and other settings when they are not explicitly specified at the linker command line. -Currently, GCC does not support combining LTO object files compiled -with different set of the command line options into a single binary. -At link time, the options given on the command line and the options -saved on all the files in a link-time set are applied globally. No -attempt is made at validating the combination of flags (other than the -usual validation done by option processing). This is implemented in -@file{lto/lto.cc}:@code{lto_read_all_file_options}. +Most options are recorded at a per function level and their setting +restored when processing the functions at link time. Global options +are composed from options specified at compile time and link time. +How exactly they are combined or mismatches diagnosed is implemented in +@file{lto-wrapper.cc}:@code{find_and_merge_options}. @item Symbol table (@code{.gnu.lto_.symtab})