From 63e8930dd238ef80b226223cfd83f73dbb858a81 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 26 Jun 2022 22:33:35 -0700 Subject: Support link-time optimization. --- Makefile | 6 +++--- git-tag.h | 4 +--- main.cpp | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index be9dc32..5c0e04a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -OPTIMIZE ?= -O3 +OPTIMIZE ?= -O3 -flto DEBUG ?= -g AR ?= ar @@ -21,9 +21,9 @@ endif $(info Version ${VERSION}) define GITTAGCPP = -#include +#include "git-tag.h" -std::string GIT_TAG = "$(subst ",\",${VERSION})"; +const char *GIT_TAG = "$(subst ",\",${VERSION})"; endef export GITTAGCPP diff --git a/git-tag.h b/git-tag.h index 280f0c7..0f36b73 100644 --- a/git-tag.h +++ b/git-tag.h @@ -1,5 +1,3 @@ #pragma once -#include - -extern const std::string GIT_TAG; +extern const char *GIT_TAG; diff --git a/main.cpp b/main.cpp index 4bd455a..e1ec736 100644 --- a/main.cpp +++ b/main.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include "aisa/aisa.h" -- cgit v1.2.3