Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ $(info $(MSG_PREFIX)Using AR=$(AR))
$(info $(MSG_PREFIX)Using LD=$(LD))

PROG := abc

OS := $(shell uname -s)
ifneq ($(filter MINGW%,$(OS)),)
OS := MINGW
endif

MODULES := \
$(wildcard src/ext*) \
Expand Down Expand Up @@ -142,10 +146,15 @@ ifneq ($(OS), $(filter $(OS), FreeBSD OpenBSD NetBSD))
LIBS += -ldl
endif

ifneq ($(OS), $(filter $(OS), FreeBSD OpenBSD NetBSD Darwin))
ifneq ($(OS), $(filter $(OS), FreeBSD OpenBSD NetBSD Darwin MINGW))
LIBS += -lrt
endif

# For PathMatchSpecA.
ifeq ($(OS), MINGW)
LIBS = -lshlwapi
endif

ifdef ABC_USE_LIBSTDCXX
LIBS += -lstdc++
$(info $(MSG_PREFIX)Using explicit -lstdc++)
Expand All @@ -155,7 +164,7 @@ $(info $(MSG_PREFIX)Using CFLAGS=$(CFLAGS))
CXXFLAGS += $(CFLAGS) -std=c++17 -fno-exceptions

SRC :=
GARBAGE := core core.* *.stackdump ./tags $(PROG) arch_flags
GARBAGE := core core.* *.stackdump ./tags $(PROG) arch_flags $(PROG).in

.PHONY: all default tags clean docs cmake_info

Expand Down Expand Up @@ -221,9 +230,17 @@ clean:
tags:
etags `find . -type f -regex '.*\.\(c\|h\)'`

ifeq ($(OS), MINGW)
$(PROG): $(OBJ)
@echo "$(MSG_PREFIX)\`\` Constructing Response File:" $(notdir @$@.in)
$(file >$@.in,$^ $(LDFLAGS) $(LIBS))
@echo "$(MSG_PREFIX)\`\` Building binary:" $(notdir $@)
$(VERBOSE)$(LD) -o $@ @$@.in
else
$(PROG): $(OBJ)
@echo "$(MSG_PREFIX)\`\` Building binary:" $(notdir $@)
$(VERBOSE)$(LD) -o $@ $^ $(LDFLAGS) $(LIBS)
endif

lib$(PROG).a: $(LIBOBJ)
@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
Expand Down
2 changes: 1 addition & 1 deletion src/sat/cadical/cadical_congruence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5981,7 +5981,7 @@ void Closure::rewrite_ite_gate (Gate *g, int dst, int src) {
#endif
} else {
CADICAL_assert (false);
#ifdef WIN32
#ifdef _MSC_VER
__assume(false);
#else
__builtin_unreachable ();
Expand Down
4 changes: 2 additions & 2 deletions src/sat/cadical/cadical_vivify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ inline std::vector<vivify_ref> &current_refs_schedule (Vivifier &vivifier) {
return vivifier.refs_schedule_irred;
break;
}
#ifdef WIN32
#ifdef _MSC_VER
__assume(false);
#else
__builtin_unreachable ();
Expand All @@ -1523,7 +1523,7 @@ inline std::vector<Clause *> &current_schedule (Vivifier &vivifier) {
return vivifier.schedule_irred;
break;
}
#ifdef WIN32
#ifdef _MSC_VER
__assume(false);
#else
__builtin_unreachable ();
Expand Down
2 changes: 1 addition & 1 deletion src/sat/kissat/colors.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "colors.h"

#ifdef WIN32
#ifdef _MSC_VER
#define isatty _isatty
#else
#include <unistd.h>
Expand Down
Loading