2024-06-03 16:09:33 +00:00
|
|
|
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
|
|
|
|
#── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
|
|
|
|
|
|
|
|
PKGS += CTL
|
|
|
|
|
|
|
|
CTL_ARTIFACTS += CTL_A
|
|
|
|
CTL = $(CTL_A_DEPS) $(CTL_A)
|
|
|
|
CTL_A = o/$(MODE)/ctl/ctl.a
|
|
|
|
CTL_A_FILES := $(wildcard ctl/*)
|
|
|
|
CTL_A_HDRS = $(filter %.h,$(CTL_A_FILES))
|
|
|
|
CTL_A_SRCS = $(filter %.cc,$(CTL_A_FILES))
|
|
|
|
CTL_A_OBJS = $(CTL_A_SRCS:%.cc=o/$(MODE)/%.o)
|
|
|
|
|
|
|
|
CTL_A_CHECKS = \
|
|
|
|
$(CTL_A).pkg \
|
|
|
|
$(CTL_A_HDRS:%=o/$(MODE)/%.okk) \
|
|
|
|
|
|
|
|
CTL_A_DIRECTDEPS = \
|
|
|
|
LIBC_INTRIN \
|
|
|
|
LIBC_MEM \
|
2024-06-29 22:45:09 +00:00
|
|
|
LIBC_STDIO \
|
2024-06-03 16:09:33 +00:00
|
|
|
LIBC_STR \
|
2024-06-29 22:45:09 +00:00
|
|
|
THIRD_PARTY_GDTOA \
|
|
|
|
THIRD_PARTY_LIBCXXABI \
|
|
|
|
THIRD_PARTY_LIBUNWIND \
|
2024-06-03 16:09:33 +00:00
|
|
|
|
|
|
|
CTL_A_DEPS := $(call uniq,$(foreach x,$(CTL_A_DIRECTDEPS),$($(x))))
|
|
|
|
|
|
|
|
$(CTL_A): ctl/ \
|
|
|
|
$(CTL_A).pkg \
|
|
|
|
$(CTL_A_OBJS)
|
|
|
|
|
|
|
|
$(CTL_A).pkg: \
|
|
|
|
$(CTL_A_OBJS) \
|
|
|
|
$(foreach x,$(CTL_A_DIRECTDEPS),$($(x)_A).pkg)
|
|
|
|
|
|
|
|
$(CTL_A_OBJS): private \
|
|
|
|
OVERRIDE_CXXFLAGS += \
|
|
|
|
-Wframe-larger-than=4096 \
|
|
|
|
-Walloca-larger-than=4096 \
|
|
|
|
-ffunction-sections \
|
|
|
|
-fdata-sections \
|
Introduce more CTL content
This change introduces accumulate, addressof, advance, all_of, distance,
array, enable_if, allocator_traits, back_inserter, bad_alloc, is_signed,
any_of, copy, exception, fill, fill_n, is_same, is_same_v, out_of_range,
lexicographical_compare, is_integral, uninitialized_fill_n, is_unsigned,
numeric_limits, uninitialized_fill, iterator_traits, move_backward, min,
max, iterator_tag, move_iterator, reverse_iterator, uninitialized_move_n
This change experiments with rewriting the ctl::vector class to make the
CTL design more similar to the STL. So far it has not slowed things down
to have 42 #include lines rather than 2, since it's still almost nothing
compared to LLVM's code. In fact the closer we can flirt with being just
like libcxx, the better chance we might have of discovering exactly what
makes it so slow to compile. It would be an enormous discovery if we can
find one simple trick to solving the issue there instead.
This also fixes a bug in `ctl::string(const string &s)` when `s` is big.
2024-06-28 05:18:55 +00:00
|
|
|
-fexceptions \
|
2024-06-03 16:09:33 +00:00
|
|
|
|
|
|
|
CTL_LIBS = $(foreach x,$(CTL_ARTIFACTS),$($(x)))
|
|
|
|
CTL_SRCS = $(foreach x,$(CTL_ARTIFACTS),$($(x)_SRCS))
|
|
|
|
CTL_HDRS = $(foreach x,$(CTL_ARTIFACTS),$($(x)_HDRS))
|
|
|
|
CTL_CHECKS = $(foreach x,$(CTL_ARTIFACTS),$($(x)_CHECKS))
|
|
|
|
CTL_OBJS = $(foreach x,$(CTL_ARTIFACTS),$($(x)_OBJS))
|
|
|
|
$(CTL_OBJS): $(BUILD_FILES) ctl/BUILD.mk
|
|
|
|
|
|
|
|
.PHONY: o/$(MODE)/ctl
|
|
|
|
o/$(MODE)/ctl: $(CTL_CHECKS)
|