From 07ab7dae622f150cf2765cb1334aedc5cbce00c9 Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jeremy@system76.com> Date: Fri, 14 Dec 2018 20:07:46 -0700 Subject: [PATCH] Update llvm and rust recipes --- cook.sh | 8 +++++++- recipes/llvm/recipe.sh | 2 -- recipes/rust/llvm-config | 6 +++--- recipes/rust/recipe.sh | 5 ++++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/cook.sh b/cook.sh index cdff410ea..de9720e48 100755 --- a/cook.sh +++ b/cook.sh @@ -8,6 +8,7 @@ source config.sh export BINDIR=bin export CARGOFLAGS= export DEBUG= +export PREPARE_COPY=1 if [ ! "$(uname -s)" = "Redox" ] then @@ -250,7 +251,12 @@ function op { fi rm -rf build - cp -rp source build + if [ "$PREPARE_COPY" -eq "0" ] + then + mkdir build + else + cp -rp source build + fi for patch in *.patch do diff --git a/recipes/llvm/recipe.sh b/recipes/llvm/recipe.sh index a035edf2a..0927565aa 100644 --- a/recipes/llvm/recipe.sh +++ b/recipes/llvm/recipe.sh @@ -40,8 +40,6 @@ function recipe_build { -DLLVM_INCLUDE_EXAMPLES=Off -DLLVM_BUILD_TESTS=Off -DLLVM_INCLUDE_TESTS=Off - -DLLVM_BUILD_TOOLS=Off - -DLLVM_INCLUDE_TOOLS=Off -DLLVM_BUILD_UTILS=Off -DLLVM_INCLUDE_UTILS=Off -target="$HOST" diff --git a/recipes/rust/llvm-config b/recipes/rust/llvm-config index 7b34d1722..086d0bb5f 100755 --- a/recipes/rust/llvm-config +++ b/recipes/rust/llvm-config @@ -10,11 +10,11 @@ prefix = os.path.realpath(os.path.dirname(os.path.abspath(sys.argv[0])) + "/sysr # This is a hack, and should be replaced if possible. if args == ["--version"]: - print("8.0.0") + print("8.0.0svn") elif args == ["--cxxflags"]: - print("-I" + prefix + "/include --std=gnu++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=gnu++11 -g -fno-exceptions -fno-rtti -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS") + print("-I" + prefix + "/include --std=gnu++11 -fPIC -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-comment -g -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS") elif args == ["--components"]: - print("all all-targets analysis asmparser asmprinter bitreader bitwriter codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle engine executionengine globalisel instcombine instrumentation interpreter ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser mirparser native nativecodegen objcarcopts object objectyaml option orcjit passes profiledata runtimedyld scalaropts selectiondag support symbolize tablegen target transformutils vectorize x86 x86asmparser x86asmprinter x86codegen x86desc x86disassembler x86info x86utils") + print("aggressiveinstcombine all all-targets analysis asmparser asmprinter binaryformat bitreader bitwriter codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine fuzzmutate globalisel instcombine instrumentation interpreter ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser mirparser native nativecodegen objcarcopts object objectyaml option orcjit passes profiledata runtimedyld scalaropts selectiondag support symbolize tablegen target transformutils vectorize windowsmanifest x86 x86asmparser x86asmprinter x86codegen x86desc x86disassembler x86info x86utils") elif args == ['--libs', '--link-static', 'asmparser', 'bitreader', 'bitwriter', 'instrumentation', 'interpreter', 'ipo', 'linker', 'lto', 'mcjit', 'x86']: print( "-lLLVMLTO -lLLVMObjCARCOpts -lLLVMPasses -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen" diff --git a/recipes/rust/recipe.sh b/recipes/rust/recipe.sh index ec445229b..e34375a35 100644 --- a/recipes/rust/recipe.sh +++ b/recipes/rust/recipe.sh @@ -2,6 +2,7 @@ GIT=https://gitlab.redox-os.org/redox-os/rust.git BRANCH=compile-redox BUILD_DEPENDS=(llvm) DEPENDS="gcc cargo" +PREPARE_COPY=0 function recipe_version { printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" @@ -14,8 +15,10 @@ function recipe_update { } function recipe_build { + config="$(realpath ../config.toml)" + source="$(realpath ../source)" unset AR AS CC CXX LD NM OBJCOPY OBJDUMP RANLIB READELF STRIP - python x.py dist --config ../config.toml --jobs $(nproc) --incremental --keep-stage 0 + python "$source/x.py" dist --config "$config" --jobs $(nproc) --incremental skip=1 } -- GitLab