Re: [webkit-dev] Using compile_command.json in sources that go into Unified Sources
O Lun, 26-03-2018 ás 14:30 +0100, Adrian Perez de Castro escribiu: > > I *think* that many tools like scan-build should work equally well > regardless > of whether the compilation database contains the unifies or the > individual > sources. But of course it's difficult to predict what every other > tool will > do, so it's impossible to be sure :-\ There are many tools that do require to have the individual sources. For example ycm (we already have a config file for it in tree) requires the user to define a callback which just receives a file name (the one being opened in the IDE) and returns the compilation flags for that file. Should we have a way to get the unified source where each individual file was added we could solve this easily. BR ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] Using compile_command.json in sources that go into Unified Sources
26.03.2018, 16:31, "Adrian Perez de Castro": > On Mon, 26 Mar 2018 07:54:38 -0500, Michael Catanzaro > wrote: >> On Sat, Mar 24, 2018 at 6:03 PM, Cadu Bentzen >> wrote: >> > I included calling this script at the end of the build-webkit (under >> > a command line option) script. So far it has work for me, but I >> > wonder if this is the right approach or if you already solved that in >> > another way. >> >> Is compile_commands.json intended only for use by IDEs? If it's not >> going to break anything, then this seems reasonable to me. I would go >> ahead and submit a patch for review on bugs.webkit.org, and leave a >> link to it in this thread. > > At least I know also that the “scan-build” implementation in Python [1] uses > the compilation database (in my experience it is easier to get running than > Clang's, and is what I have used in the past to run the Clang analyzer on the > WebKit code). A lot of other clang-based tools use this file, most notably clang-tidy. > > I *think* that many tools like scan-build should work equally well regardless > of whether the compilation database contains the unifies or the individual > sources. But of course it's difficult to predict what every other tool will > do, so it's impossible to be sure :-\ > > Didn't we have a CMake flag that disabled unified sources completely? Maybe > people who want to use “compile_commands.json” with IDEs can just use that… > > Cheers, > > -- > Adrián > , > > ___ > webkit-dev mailing list > webkit-dev@lists.webkit.org > https://lists.webkit.org/mailman/listinfo/webkit-dev -- Regards, Konstantin ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] Using compile_command.json in sources that go into Unified Sources
On Mon, 26 Mar 2018 07:54:38 -0500, Michael Catanzarowrote: > On Sat, Mar 24, 2018 at 6:03 PM, Cadu Bentzen > wrote: > > I included calling this script at the end of the build-webkit (under > > a command line option) script. So far it has work for me, but I > > wonder if this is the right approach or if you already solved that in > > another way. > > Is compile_commands.json intended only for use by IDEs? If it's not > going to break anything, then this seems reasonable to me. I would go > ahead and submit a patch for review on bugs.webkit.org, and leave a > link to it in this thread. At least I know also that the “scan-build” implementation in Python [1] uses the compilation database (in my experience it is easier to get running than Clang's, and is what I have used in the past to run the Clang analyzer on the WebKit code). I *think* that many tools like scan-build should work equally well regardless of whether the compilation database contains the unifies or the individual sources. But of course it's difficult to predict what every other tool will do, so it's impossible to be sure :-\ Didn't we have a CMake flag that disabled unified sources completely? Maybe people who want to use “compile_commands.json” with IDEs can just use that… Cheers, -- Adrián pgpxehPRGlYiz.pgp Description: PGP signature ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] Using compile_command.json in sources that go into Unified Sources
On Sat, Mar 24, 2018 at 6:03 PM, Cadu Bentzenwrote: I included calling this script at the end of the build-webkit (under a command line option) script. So far it has work for me, but I wonder if this is the right approach or if you already solved that in another way. Is compile_commands.json intended only for use by IDEs? If it's not going to break anything, then this seems reasonable to me. I would go ahead and submit a patch for review on bugs.webkit.org, and leave a link to it in this thread. Michael ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev