Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odgi: add linux-aarch64 build #48682

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion recipes/odgi/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash

set -xe

case $(uname -m) in
x86_64)
ARCH_OPTS="-march=sandybridge"
;;
*)
ARCH_OPTS=""
;;
esac

mkdir -p $PREFIX/bin

export INCLUDES="-I${PREFIX}/include"
Expand All @@ -15,7 +26,7 @@ fi

cmake -S . -B build -DCMAKE_BUILD_TYPE=Generic \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DEXTRA_FLAGS='-march=sandybridge -Ofast' \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DEXTRA_FLAGS="${ARCH_OPTS} -Ofast" \
"${CONFIG_ARGS}"
cmake --build build --target install -j "${CPU_COUNT}" -v

Expand Down
6 changes: 5 additions & 1 deletion recipes/odgi/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ package:
source:
url: https://github.com/pangenome/{{ name }}/releases/download/v{{ version }}/{{ name }}-v{{ version }}.tar.gz
sha256: 73b181c371e619b5e3e5ee87649cb8de82b054e492dcd128d93cec42be062f2f
patches:
- odgi-linux-aarch64.patch # [aarch64]

build:
skip: True # [osx]
number: 0
number: 1
run_exports:
- {{ pin_subpackage(name, max_pin="x.x") }}

Expand Down Expand Up @@ -48,6 +50,8 @@ about:
doc_url: "https://github.com/pangenome/odgi/blob/v{{ version }}/README.md"

extra:
additional-platforms:
- linux-aarch64
recipe-maintainers:
- AndreaGuarracino
identifiers:
Expand Down
26 changes: 26 additions & 0 deletions recipes/odgi/odgi-linux-aarch64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git i/CMakeLists.txt w/CMakeLists.txt
index dc6e9b44..1c34379c 100644
--- i/CMakeLists.txt
+++ w/CMakeLists.txt
@@ -52,7 +52,7 @@ endif()

# Set optimization through command line; see INSTALL.md
if (${CMAKE_BUILD_TYPE} MATCHES Release)
- set(EXTRA_FLAGS "-Ofast -march=native -pipe -msse4.2 -funroll-all-loops") # -fprofile-generate=../pgo")
+ set(EXTRA_FLAGS "-Ofast -march=native -pipe -funroll-all-loops") # -fprofile-generate=../pgo")
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG") # reset CXX_FLAGS to be able to replace -O3 with -Ofast
endif ()

diff --git i/src/main.cpp w/src/main.cpp
index 0300dbd1..68e512d4 100644
--- i/src/main.cpp
+++ w/src/main.cpp
@@ -29,7 +29,7 @@ void odgi_help(char** argv) {

// We make sure to compile main for the lowest common denominator architecture.
// This works on GCC and Clang. But we have to declare main and then define it.
-int main(int argc, char *argv[]) __attribute__((__target__("arch=x86-64")));
+//int main(int argc, char *argv[]) __attribute__((__target__("arch=x86-64")));

int main(int argc, char *argv[]) {
// set a higher value for tcmalloc warnings
Loading