Support multiple versions of llvm in chroot |
|||||||
Issue descriptionCurrently only a single llvm/clang version is supported in ChromeOS chroot. Often it is desirable to have the older versions available for various reasons. 1. If some package does not work with latest llvm but worked with an older version, we can use older llvm to build that package instead of rolling back. 2. Many times, It is easier to experiment or test builds if old/new versions of compiler are present in same chroot.
,
Dec 26 2017
,
Jan 2 2018
[It appears that a bunch of old cros issues bulk-added the "Infra" component recently, but they should probably be "Infra>Client>ChromeOS".]
,
Jan 4 2018
,
Feb 5 2018
,
Mar 14 2018
Thinking of following approach: 1. Installing an older llvm using a separate slot+prefix 2. Add a wrapper-only option to invoke this clang.
,
Mar 14 2018
,
Mar 23 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/00a6378121f3c00e9046758fc1a4ed9e7e104df3 commit 00a6378121f3c00e9046758fc1a4ed9e7e104df3 Author: Manoj Gupta <manojgupta@google.com> Date: Fri Mar 23 21:50:56 2018 llvm: Cleanup some unused USE flags. clang, static-analyzer, lld, kernel_Darwin and gold use flags are not used for building llvm in Chrome OS. Drop them and remove the related code to clean up the ebuild. BUG=chromium:773887 TEST=Files in $(equery f sys-devel/llvm) is unchanged. Change-Id: Id885b0bf983f4e27eecae5c0e6f1924f02177d38 Reviewed-on: https://chromium-review.googlesource.com/976654 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@chromium.org> [rename] https://crrev.com/00a6378121f3c00e9046758fc1a4ed9e7e104df3/sys-devel/llvm/llvm-7.0_pre326829_p20180318-r1.ebuild [rename] https://crrev.com/00a6378121f3c00e9046758fc1a4ed9e7e104df3/sys-devel/clang/clang-7.0_pre326829_p20180318-r1.ebuild
,
Mar 31 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/2cc9bbc5bd186428fd5467e83f2ab9e523584df9 commit 2cc9bbc5bd186428fd5467e83f2ab9e523584df9 Author: Manoj Gupta <manojgupta@google.com> Date: Sat Mar 31 08:56:31 2018 llvm: Update wrappers for multiple llvm installations. Currently only one version of llvm is installed in the chroot. Update the host and target wrappers to support using a llvm installation in a custom location. A new wrapper option "-Xclang-path=" is added to specify the location of the custom clang installation. Any package that needs to use a different clang than the default should specify this option. BUG=chromium:773887 TEST=Chromiumos-sdk, kevin, peppy tryjobs passed. Change-Id: If865d3ce843a0490c855d29484f469ce4fcbb94b Reviewed-on: https://chromium-review.googlesource.com/982397 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> [rename] https://crrev.com/2cc9bbc5bd186428fd5467e83f2ab9e523584df9/sys-devel/gcc/gcc-4.9.2-r185.ebuild [modify] https://crrev.com/2cc9bbc5bd186428fd5467e83f2ab9e523584df9/sys-devel/gcc/files/sysroot_wrapper.body [modify] https://crrev.com/2cc9bbc5bd186428fd5467e83f2ab9e523584df9/sys-devel/llvm/files/clang_host_wrapper.body [rename] https://crrev.com/2cc9bbc5bd186428fd5467e83f2ab9e523584df9/sys-devel/llvm/llvm-7.0_pre326829_p20180318-r5.ebuild
,
Aug 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/toolchain-utils/+/4a3dce09b5295b0d21129ec68660b96dfb3776e5 commit 4a3dce09b5295b0d21129ec68660b96dfb3776e5 Author: Manoj Gupta <manojgupta@google.com> Date: Fri Aug 03 04:50:23 2018 toolchain-utils: Add a tool to create llvm-extra ebuild. llvm-extra ebuild is a slotted llvm compiler ebuild that can be installed in parallel to the regualr llvm compiler. Use of llvm-extra package is to provide an alternate clang in case the normal clang compiler binary can't be used. e.g. After a llvm upgrade, some package foo is miscompiled. To avoid the miscompilation, we can use llvm-extra ebuild to install the previous clang. To use the clang installed by llvm-extra, modify the CFLAGS and LDFLAGS to pass the patch of the clang binary installed by llvm-extra package. e.g. append-flags -Xclang-path=/usr/llvm-extra/version/clang append-ldflags -Xclang-path=/usr/llvm-extra/version/clang This CL only adds the tool that can generate the llvm-extra ebuilds from a given llvm ebuild. BUG=chromium:773887 TEST= ./create_llvm_extra.sh /path/to/llvm/llvm-7.0_pre331547_p20180529-r8.ebuild worked. A new llvm-extra ebuild was generated. Change-Id: I7e3e20a2740f5e7135dbcd252cc271945c6ddd34 Reviewed-on: https://chromium-review.googlesource.com/1161213 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org> [add] https://crrev.com/4a3dce09b5295b0d21129ec68660b96dfb3776e5/llvm_extra/create_llvm_extra.sh [add] https://crrev.com/4a3dce09b5295b0d21129ec68660b96dfb3776e5/llvm_extra/create_ebuild_file.py
,
Sep 13
the filesystem conventions we use for all other cross-compilers are: * /usr/$CTARGET/ - sysroot for $CTARGET * /usr/$CHOST/$CTARGET/ - tools that run on $CHOST and target $CTARGET * /usr/$CHOST/... - tools that run on $CHOST and target $CHOST * /usr/lib/gcc/($CTARGET|$CHOST)/ - gcc libs that target $CTARGET we don't carve out project-specific dirs directly under /usr. llvm is a bit diff from GNU toolchains in that it's a single build (vs configuring+building the same package with diff CTARGET values). so imo, we should be using /usr/$(get_libdir)/llvm/<version>/ to hold slotted packages instead of /usr/llvm-<version>/. or if you want the tools to be completely standalone, /opt/llvm/<version>/ or /opt/llvm-<version>/ would work too.
,
Sep 14
Sure, moving the paths /usr/$(get_libdir)/llvm/<version>/ or opt/llvm-<version>/ to would be fine.
,
Jan 11
This issue has an owner, a component and a priority, but is still listed as untriaged or unconfirmed. By definition, this bug is triaged. Changing status to "assigned". Please reach out to me if you disagree with how I've done this. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by bugdroid1@chromium.org
, Oct 17 2017