Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tobtoht committed Dec 11, 2024
1 parent 6bbf5e9 commit c2c93fb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 151 deletions.
5 changes: 0 additions & 5 deletions contrib/depends/funcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ $(1)_build_env+=$($(1)_build_env_$(host_arch)) $($(1)_build_env_$(host_arch)_$(r
$(1)_build_env+=$($(1)_build_env_$(host_os)) $($(1)_build_env_$(host_os)_$(release_type))
$(1)_build_env+=$($(1)_build_env_$(host_arch)_$(host_os)) $($(1)_build_env_$(host_arch)_$(host_os)_$(release_type))

$(1)_stage_env+=$$($(1)_stage_env_$(release_type))
$(1)_stage_env+=$($(1)_stage_env_$(host_arch)) $($(1)_stage_env_$(host_arch)_$(release_type))
$(1)_stage_env+=$($(1)_stage_env_$(host_os)) $($(1)_stage_env_$(host_os)_$(release_type))
$(1)_stage_env+=$($(1)_stage_env_$(host_arch)_$(host_os)) $($(1)_stage_env_$(host_arch)_$(host_os)_$(release_type))

$(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
Expand Down
126 changes: 0 additions & 126 deletions contrib/depends/patches/openssl/android-fix.patch

This file was deleted.

2 changes: 0 additions & 2 deletions contrib/guix/guix-build
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,6 @@ EOF
exit 0
fi

# TODO: use depends to fetch and clean rustc source

# Fetch cargo dependencies
time-machine environment --manifest="${PWD}/contrib/guix/rust/cargo.scm" \
--container \
Expand Down
11 changes: 7 additions & 4 deletions contrib/guix/libexec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ unset CPLUS_INCLUDE_PATH
unset OBJC_INCLUDE_PATH
unset OBJCPLUS_INCLUDE_PATH

export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64:${NATIVE_GCC_STATIC}/lib:${NATIVE_GCC_STATIC}/lib64:$(store_path "zlib")/lib"
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64:${NATIVE_GCC_STATIC}/lib:${NATIVE_GCC_STATIC}/lib64"
export C_INCLUDE_PATH="${NATIVE_GCC}/include"
export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
export OBJC_INCLUDE_PATH="${NATIVE_GCC}/include"
Expand Down Expand Up @@ -146,7 +146,10 @@ case "$HOST" in
esac

# TODO
export LD_LIBRARY_PATH="$(store_path xz)/lib:${NATIVE_GCC}/lib:$(store_path zlib)/lib"
# error: failed to run custom build command for `compiler_builtins`
#
# error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
export LD_LIBRARY_PATH="${NATIVE_GCC}/lib"

# Sanity check CROSS_*_PATH directories
IFS=':' read -ra PATHS <<< "${CROSS_C_INCLUDE_PATH}:${CROSS_CPLUS_INCLUDE_PATH}:${CROSS_LIBRARY_PATH}"
Expand Down Expand Up @@ -306,7 +309,7 @@ esac
# build-std=std,panic_abort
# See: https://rust-lang.github.io/rust-project-goals/2025h1/build-std.html
# Building the standard library for targets which do not ship with a pre-compiled standard library.
CARGO_OPTIONS='-Zbuild-std=std,panic_abort --no-default-features'
CARGO_OPTIONS='-Zbuild-std=std,panic_abort;-Zbuild-std-features=panic_immediate_abort;--no-default-features'

export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
export USE_DEVICE_TREZOR_MANDATORY=1
Expand Down Expand Up @@ -365,7 +368,7 @@ mkdir -p "$DISTSRC"
-DCMAKE_SKIP_RPATH=ON \
-DMANUAL_SUBMODULES=1 \
-DGUIX=1 \
-DRUST_SRC=${RUST_SRC} \
-DRUST_SRC="${RUST_SRC}" \
-DCARGO_OPTIONS="${CARGO_OPTIONS}"

make -C build --jobs="$JOBS"
Expand Down
5 changes: 2 additions & 3 deletions contrib/guix/manifest.scm
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ chain for " target " development."))
p7zip
zip
unzip
zlib
;; Build tools
gnu-make
libtool
Expand Down Expand Up @@ -293,8 +292,8 @@ chain for " target " development."))
(list gcc-toolchain-12 "static")))
((string-contains target "darwin")
(list
gcc-toolchain-11
(list gcc-toolchain-12 "static")
gcc-toolchain-10
(list gcc-toolchain-10 "static")
clang-toolchain-11
binutils))
(else '())))))
17 changes: 6 additions & 11 deletions src/fcmp_pp/fcmp_pp_rust/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,13 @@ endif()

set(RUST_TARGET "${RUST_ARCH}-${RUST_PLATFORM}${RUST_TOOLCHAIN}")

if (GUIX)
set(CARGO_CMD cargo build --target "${RUST_TARGET}" --release -Zbuild-std=std,panic_abort -Z build-std-features=panic_immediate_abort --no-default-features)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CARGO_CMD cargo build --target "${RUST_TARGET}" ${CARGO_OPTIONS})
set(TARGET_DIR "debug")
else ()
set(CARGO_CMD cargo build --target "${RUST_TARGET}" --release ${CARGO_OPTIONS})
set(TARGET_DIR "release")
else()
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CARGO_CMD cargo build --target "${RUST_TARGET}" ${CARGO_OPTIONS})
set(TARGET_DIR "debug")
else ()
set(CARGO_CMD cargo build --target "${RUST_TARGET}" --release)
set(TARGET_DIR "release")
endif ()
endif()
endif ()

set(FCMP_PP_RUST_HEADER_DIR "${MONERO_GENERATED_HEADERS_DIR}/fcmp_pp_rust")
set(FCMP_PP_RUST_HEADER "${FCMP_PP_RUST_HEADER_DIR}/fcmp++.h")
Expand Down

0 comments on commit c2c93fb

Please sign in to comment.