Closed Bug 1493641 Opened Last year Closed Last year

[Clang-Tidy] Enabling DYLIB for clang-tidy on macOS brakes the artifact.

Categories

(Firefox Build System :: Toolchains, enhancement)

enhancement
Not set

Tracking

(firefox64 fixed)

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: andi, Assigned: andi)

Details

Attachments

(1 file)

Bug 1491788 update lead to the breaking of the clang-tidy artifact with on macOS with:

>>dyld: Library not loaded: @rpath/libLLVM.dylib
>>  Referenced from: /Users/abpostelnicu/.mozbuild/clang-tools/clang/bin/./clang-format
>>  Reason: image not found
>>Abort trap: 6

It's the same behavior with other executable from this artifact, like clang-tidy. Doing an otool on one of the executable we get:

>>clang-tidy:
>>	@rpath/libLLVM.dylib (compatibility version 1.0.0, current version 7.0.0)
>>	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
>>	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
Assignee: nobody → bpostelnicu
It seems that adding the DYLIB option, Bug 1492037, brakes something on macOS, maybe when we filter the files that need to be deleted we also delete de dylib.
Summary: [Clang-Tidy] Update to clang7 broke the artifact on macOS → [Clang-Tidy] Enabling DYLIB for clang-tidy on macOS brakes the artifact.
move back to static for that.
I bet here is the problem, we're doing a cross-build from linux targeting macOS so we cannot rely on:

>>def is_darwin():
>>    return platform.system() == "Darwin"

so this will fail and the dylib will be deleted:

>>        if is_darwin() and name == 'libLLVM.dylib':
>>            continue
Comment on attachment 9011583 [details]
Bug 1493641 - embed the libLLVM.dylib into clang-tidy artifact on macOS. r=froydnj

Nathan Froyd [:froydnj] has approved the revision.
Attachment #9011583 - Flags: review+
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5beded4f9898
embed the libLLVM.dylib into clang-tidy artifact on macOS. r=froydnj
https://hg.mozilla.org/mozilla-central/rev/5beded4f9898
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.