Skip to content

Commit

Permalink
Change Synlig exit message (#2559)
Browse files Browse the repository at this point in the history
This PR adapts exit message.
  • Loading branch information
tgorochowik authored Sep 13, 2024
2 parents ca23376 + 327944a commit acc32b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ LINKFLAGS += -rdynamic
LIBS += -lrt
endif

# --- detect yosys version #
YOSYS_VER := $(shell grep $(YOSYS_SRC)/Makefile -e "YOSYS_VER := " | head -n 1 | cut -d ' ' -f 3)
GIT_REV := $(shell GIT_DIR=$(YOSYS_SRC)/.git git rev-parse --short=9 HEAD || echo UNKNOWN)
# --- detect synlig hash --- #
GIT_REV := $(shell GIT_DIR=$(REPO_DIR)/.git git rev-parse --short=9 HEAD || echo UNKNOWN)
OBJS = kernel/version_$(GIT_REV).o

# --- set abc flags --- #
Expand Down Expand Up @@ -383,12 +382,12 @@ $(REPO_DIR)/src/frontends/systemverilog/%.o: $(REPO_DIR)/src/frontends/systemver
$(Q) mkdir -p $(dir $@)
$(P) $(CXX) -o $@ -c $(CPPFLAGS) $(CXXFLAGS) $<

YOSYS_VER_STR := Yosys $(YOSYS_VER) (git sha1 $(GIT_REV), $(notdir $(CXX)) $(shell \
VERSION_STR := Synlig (git sha1 $(GIT_REV), $(notdir $(CXX)) $(shell \
$(CXX) --version | tr ' ()' '\n' | grep '^[0-9]' | head -n1) $(filter -f% -m% -O% -DNDEBUG,$(CXXFLAGS)))

kernel/version_$(GIT_REV).cc: $(YOSYS_SRC)/Makefile
$(P) rm -f kernel/version_*.o kernel/version_*.d kernel/version_*.cc
$(Q) mkdir -p kernel && echo "namespace Yosys { extern const char *yosys_version_str; const char *yosys_version_str=\"$(YOSYS_VER_STR)\"; }" > kernel/version_$(GIT_REV).cc
$(Q) mkdir -p kernel && echo "namespace Yosys { extern const char *yosys_version_str; const char *yosys_version_str=\"$(VERSION_STR)\"; }" > kernel/version_$(GIT_REV).cc

.PHONY: check-git-abc

Expand Down
1 change: 0 additions & 1 deletion src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,6 @@ int main(int argc, char **argv)
log("End of script. Logfile hash: %s%sCPU: user %.2fs system %.2fs%s\n", hash.c_str(), stats_divider.c_str(),
ru_buffer.ru_utime.tv_sec + 1e-6 * ru_buffer.ru_utime.tv_usec, ru_buffer.ru_stime.tv_sec + 1e-6 * ru_buffer.ru_stime.tv_usec,
meminfo.c_str());
log("%s\n", yosys_version_str);

int64_t total_ns = 0;
std::set<tuple<int64_t, int, std::string>> timedat;
Expand Down

0 comments on commit acc32b2

Please sign in to comment.