aboutsummaryrefslogtreecommitdiff
path: root/src/tomo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tomo.c')
-rw-r--r--src/tomo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tomo.c b/src/tomo.c
index ceee2518..080edc96 100644
--- a/src/tomo.c
+++ b/src/tomo.c
@@ -22,6 +22,7 @@
#include "modules.h"
#include "naming.h"
#include "parse/files.h"
+#include "print.h"
#include "stdlib/bools.h"
#include "stdlib/bytes.h"
#include "stdlib/c_strings.h"
@@ -31,13 +32,12 @@
#include "stdlib/lists.h"
#include "stdlib/optionals.h"
#include "stdlib/paths.h"
-#include "stdlib/print.h"
#include "stdlib/random.h"
#include "stdlib/siphash.h"
#include "stdlib/tables.h"
#include "stdlib/text.h"
-#include "stdlib/util.h"
#include "types.h"
+#include "util.h"
#define run_cmd(...) \
({ \
@@ -78,16 +78,16 @@ static List_t format_files = EMPTY_LIST, format_files_inplace = EMPTY_LIST, pars
run_files = EMPTY_LIST, uninstall_libraries = EMPTY_LIST, libraries = EMPTY_LIST, args = EMPTY_LIST;
static OptionalText_t show_codegen = NONE_TEXT,
- cflags = Text("-Werror -fdollars-in-identifiers -std=c2x -Wno-trigraphs "
+ cflags = Text("-Werror -fdollars-in-identifiers -std=c2x -Wno-trigraphs"
" -ffunction-sections -fdata-sections"
- " -fno-signed-zeros "
+ " -fno-signed-zeros"
+ " -flto=auto -fno-fat-lto-objects -Wl,-flto"
" -D_XOPEN_SOURCE -D_DEFAULT_SOURCE -fPIC -ggdb"
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
" -D_BSD_SOURCE"
#endif
" -DGC_THREADS"),
- ldlibs = Text("-lgc -lm -lgmp -lunistring"), ldflags = Text(""), optimization = Text("2"),
- cc = Text(DEFAULT_C_COMPILER);
+ ldlibs = Text("-lm"), ldflags = Text(""), optimization = Text("2"), cc = Text(DEFAULT_C_COMPILER);
static Text_t config_summary,
// This will be either "" or "sudo -u <user>" or "doas -u <user>"
@@ -953,7 +953,7 @@ Path_t compile_executable(env_t *base_env, Path_t path, Path_t exe_path, List_t
// the libraries that are used.
" ", is_gcc ? Texts("-Wl,--start-group ", list_text(archives), " -Wl,--end-group") : list_text(archives),
// Tomo static library:
- " ", TOMO_PATH, "/lib/libtomo@", TOMO_VERSION, ".a",
+ " -Wl,--no-whole-archive", " ", TOMO_PATH, "/lib/libtomo@", TOMO_VERSION, ".a",
// Output file:
" -o ", exe_path);