Patchwork [meta-oe,2/5] llvm: don't do out-of-tree builds manually

login
register
mail settings
Submitter Ross Burton
Date Jan. 15, 2014, 11:37 a.m.
Message ID <1389785832-3120-2-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/64883/
State Accepted, archived
Headers show

Comments

Ross Burton - Jan. 15, 2014, 11:37 a.m.
cmake.bbclass as of oe-core 783fb88 defaults to out-of-tree builds.  Use that
functionality directly to clean up the recipe.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta-oe/recipes-core/llvm/llvm2.inc |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
Otavio Salvador - Jan. 15, 2014, 11:43 a.m.
On Wed, Jan 15, 2014 at 9:37 AM, Ross Burton <ross.burton@intel.com> wrote:

> cmake.bbclass as of oe-core 783fb88 defaults to out-of-tree builds.  Use
> that
> functionality directly to clean up the recipe.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
>

Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>

Patch

diff --git a/meta-oe/recipes-core/llvm/llvm2.inc b/meta-oe/recipes-core/llvm/llvm2.inc
index f683fc3..a1f6ce8 100644
--- a/meta-oe/recipes-core/llvm/llvm2.inc
+++ b/meta-oe/recipes-core/llvm/llvm2.inc
@@ -20,13 +20,8 @@  LLVM_RELEASE = "${PV}"
 
 BBCLASSEXTEND = "native"
 
-LLVM_BUILD_DIR = "${B}/build"
 LLVM_INSTALL_DIR = "${B}/llvm-install"
 
-# llvm *must* be built out of tree
-OECMAKE_SOURCEPATH = ".."
-OECMAKE_BUILDPATH = "build"
-
 # other architectures require X86 available,
 LLVM_EXTRA_ARCH = "X86;"
 LLVM_EXTRA_ARCH_x86 = ""
@@ -73,7 +68,7 @@  base_do_compile_prepend() {
 
 do_install() {
     # Install into a private directory to be able to reorganize the files.
-    cd ${LLVM_BUILD_DIR}
+    cd ${B}
     oe_runmake DESTDIR=${LLVM_INSTALL_DIR} install
 
     # Create our custom target directories
@@ -101,7 +96,7 @@  do_install() {
 SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_sysroot_preprocess"
 
 llvm_sysroot_preprocess() {
-    cd ${LLVM_BUILD_DIR}
+    cd ${B}
 
     # Fix the paths in the config script to make it find the binaries and
     # library files. Doing so allows 3rd party configure scripts working
@@ -118,7 +113,7 @@  llvm_sysroot_preprocess() {
 
 do_install_class-native() {
     # Install into a private directory to be able to reorganize the files.
-    cd ${LLVM_BUILD_DIR}
+    cd ${B}
     oe_runmake DESTDIR=${LLVM_INSTALL_DIR} install
 
     # Create our custom target directories