Page MenuHomeFreeBSD

Rework check for libclang_rt to see if the needed library exists.
ClosedPublic

Authored by bdrewery on Jun 25 2018, 7:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 5, 7:18 AM
Unknown Object (File)
Nov 8 2023, 6:23 AM
Unknown Object (File)
Nov 6 2023, 6:22 AM
Unknown Object (File)
Nov 3 2023, 11:35 AM
Unknown Object (File)
Oct 27 2023, 5:26 AM
Unknown Object (File)
Oct 19 2023, 11:28 PM
Unknown Object (File)
Oct 6 2023, 5:20 AM
Unknown Object (File)
Oct 5 2023, 5:10 AM
Subscribers

Details

Summary

Currently libclang_rt is not provided for cross-building and as such
is not connected to cross-tools. For building clang once in universe
it is likely that libclang_rt won't exist for the universe toolchain
but even if it did it would not support anything but the native arch.
So explicitly check for support before enabling h_raw.

For building clang once in universe I do a 'make kernel-toolchain' with a
separate objdir. This never runs 'make libraries' so lib/libclang_rt is
never compiled. Even if we connect that to cross-tools though I think
a check like done in this diff would be needed here, or globally.

Trying to resolve this failure for my one-clang-universe patch:

--- h_raw.full ---
/scratch/obj/root/git/freebsd/freebsd12-amd64/tmp/usr/bin/ld: error: cannot open /scratch/obj/root/git/freebsd/freebsd12-amd64/tmp/usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a: No such file or directory
cc : error: linker command failed with exit code 1 (use -v to see invocation)
Test Plan

Still testing. Doing an i386 build from amd64 host and will do an amd64 build
on amd64 host, and then a one-clang-universe build.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17614
Build 17422: arc lint + arc unit

Event Timeline

Hm, I wasn't even aware of this awful hack. So for some test that runs with one of the sanitizers, it requires the clang_rt libs at world build time? E.g. we should maybe build these as part of cross-tools at some point?

In any case, LGTM regarding this part.

This revision is now accepted and ready to land.Jun 26 2018, 9:38 AM
This revision was automatically updated to reflect the committed changes.