From c63e9a4eb2614a609c9365893139d5434cff7346 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 13 Dec 2024 06:39:04 +0100 Subject: [PATCH] [OPTIMIZE] Set compiler-flags :rocket: * Created src/Makevars and set compiler-flags. No clue if it actually works. See https://stackoverflow.com/questions/32586455/how-to-change-and-set-rcpp-compile-arguments --- Makefile | 6 +++--- src/Makevars | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 src/Makevars diff --git a/Makefile b/Makefile index 5b0b82c4..5a7e2513 100644 --- a/Makefile +++ b/Makefile @@ -31,13 +31,13 @@ document: build: document @echo "Installing {$(PKGNAME)}" - R CMD build . - R CMD INSTALL $(TARBALL) + R CMD build . --clean + R CMD INSTALL --clean $(TARBALL) rm -f $(TARBALL) check: document @echo "Checking {$(PKGNAME)}" - R CMD build . + R CMD build . --clean R CMD check $(TARBALL) rm -f $(TARBALL) rm -rf $(PKGNAME).Rcheck diff --git a/src/Makevars b/src/Makevars new file mode 100644 index 00000000..8ae0fac6 --- /dev/null +++ b/src/Makevars @@ -0,0 +1,6 @@ +PKG_CXXFLAGS = -O3 -ffast-math +ifdef __aarch64__ +PKG_CXXFLAGS += -march=armv8-a +else +PKG_CXXFLAGS += -march=native +endif