Closed Bug 1337873 Opened 7 years ago Closed 7 years ago

Move the compilation database to the top source directory

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 obsolete file)

clang-tidy in some cases (such as checking a diff) needs to look up the
compile commands for a file from the source directory, and it needs to
be able to find compile_commands.json in a parent directory.
Attachment #8835010 - Flags: review?(mh+mozilla)
Blocks: 1328454
Assignee: nobody → ehsan
Comment on attachment 8835010 [details] [diff] [review]
Move the compilation database to the top source directory

Review of attachment 8835010 [details] [diff] [review]:
-----------------------------------------------------------------

Err. I'd rather avoid that if possible. We shouldn't be putting anything in the source tree. Is there _really_ no way around this?
Attachment #8835010 - Flags: review?(mh+mozilla)
(In reply to Mike Hommey [:glandium] from comment #2)
> Comment on attachment 8835010 [details] [diff] [review]
> Move the compilation database to the top source directory
> 
> Review of attachment 8835010 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Err. I'd rather avoid that if possible. We shouldn't be putting anything in
> the source tree. Is there _really_ no way around this?

There isn't.
Attachment #8835010 - Flags: review?(mh+mozilla)
(In reply to :Ehsan Akhgari from comment #3)
> (In reply to Mike Hommey [:glandium] from comment #2)
> > Err. I'd rather avoid that if possible. We shouldn't be putting anything in
> > the source tree. Is there _really_ no way around this?
> 
> There isn't.

How about "modify clang-tidy to look for the compilation DB someplace else"?
(In reply to Nathan Froyd [:froydnj] from comment #4)
> (In reply to :Ehsan Akhgari from comment #3)
> > (In reply to Mike Hommey [:glandium] from comment #2)
> > > Err. I'd rather avoid that if possible. We shouldn't be putting anything in
> > > the source tree. Is there _really_ no way around this?
> > 
> > There isn't.
> 
> How about "modify clang-tidy to look for the compilation DB someplace else"?

clang-tidy already supports that through the -p flag, but when I was trying to get clang-tidy-diff.py to pass that path to clang-tidy last night, it was prepending a -- to the argument, causing the -p flag to be passed to clang instead, but the diagnostic about that was being shut up by the clang-tidy -check flag...  So I thought that clang is trying to actually match the path of the source file against the compilation DB path.

I can fix this issue upstream.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Attachment #8835010 - Attachment is obsolete: true
Attachment #8835010 - Flags: review?(mh+mozilla)
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: