mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
4f72f6b886
FlyString is a flyweight string class that wraps a RefPtr<StringImpl> known to be unique among the set of FlyStrings. The class is very unoptimized at the moment. When to use FlyString: - When you want O(1) string comparison - When you want to deduplicate a lot of identical strings When not to use FlyString: - For strings that don't need either of the above features - For strings that are likely to be unique
37 lines
821 B
Makefile
37 lines
821 B
Makefile
SHARED_TEST_SOURCES = \
|
|
../String.cpp \
|
|
../StringImpl.cpp \
|
|
../StringBuilder.cpp \
|
|
../StringView.cpp \
|
|
../StringUtils.cpp \
|
|
../LogStream.cpp \
|
|
../JsonValue.cpp \
|
|
../JsonParser.cpp \
|
|
../FlyString.cpp \
|
|
../FileSystemPath.cpp \
|
|
../URL.cpp \
|
|
../Utf8View.cpp
|
|
|
|
SRCS = $(wildcard *.cpp)
|
|
SHARED_TEST_OBJS = ${SHARED_TEST_SOURCES:.cpp=.host.o}
|
|
OBJS = ${SRCS:.cpp=.host.o} $(SHARED_TEST_OBJS)
|
|
APPS = ${SRCS:.cpp=}
|
|
|
|
EXTRA_CLEAN = $(APPS) *.o ../*.host.o
|
|
|
|
USE_HOST_CXX = 1
|
|
|
|
include ../../Makefile.common
|
|
|
|
CXXFLAGS = -std=c++17 -Wall -Wextra -ggdb3 -O2 -I../ -I../../
|
|
|
|
APPS_RUN = $(addsuffix .run,$(APPS))
|
|
test: $(APPS) $(APPS_RUN)
|
|
$(APPS_RUN): %.run:
|
|
./$*
|
|
|
|
$(APPS): %: %$(OBJ_SUFFIX).o $(SHARED_TEST_OBJS)
|
|
@echo "LINK $@"
|
|
$(QUIET) $(CXX) -o $@ $< $(SHARED_TEST_OBJS) $(LDFLAGS)
|
|
|
|
all: | $(APPS) $(APPS_RUN)
|