aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-11-17 11:20:17 -0800
committerDmitry Vyukov <dvyukov@google.com>2018-11-17 11:42:22 -0800
commitd1a88510856c352db84d1b8ffa252c0a9ce30dec (patch)
treeb76c193cb11f94d1ae7532409e12d2255b43ee41 /Makefile
parent7d395878aa6d662c1880c5b2a7ab76378cc96b7f (diff)
sys/targest: introduce target.BuildOS
We can't cross-compile native binaries from just any OS to any other. For most OSes we can do only native compilation. Some can only be compiled from linux. To date we avoided this problem completely (mostly assumed linux build OS). Make this notion of what can build what explicit.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8c931312f..1828ab1c5 100644
--- a/Makefile
+++ b/Makefile
@@ -110,10 +110,16 @@ target:
# executor uses stacks of limited size, so no jumbo frames.
executor:
+ifeq ($(BUILDOS),$(NATIVEBUILDOS))
mkdir -p ./bin/$(TARGETOS)_$(TARGETARCH)
$(CC) -o ./bin/$(TARGETOS)_$(TARGETARCH)/syz-executor$(EXE) executor/executor.cc \
-pthread -Wall -Wframe-larger-than=8192 -Wparentheses -Werror -O2 $(ADDCFLAGS) $(CFLAGS) \
-DGOOS_$(TARGETOS)=1 -DGOARCH_$(TARGETARCH)=1 -DGIT_REVISION=\"$(REV)\"
+else
+ $(info ************************************************************************************)
+ $(info Building executor for ${TARGETOS} is not supported on ${BUILDOS}. Executor will not be built.)
+ $(info ************************************************************************************)
+endif
manager:
GOOS=$(HOSTOS) GOARCH=$(HOSTARCH) $(HOSTGO) build $(GOHOSTFLAGS) -o ./bin/syz-manager github.com/google/syzkaller/syz-manager
@@ -268,7 +274,7 @@ arch_openbsd_amd64_target:
arch_windows_amd64_target:
env GOOG=windows GOARCH=amd64 $(GO) install ./syz-fuzzer
- env TARGETOS=windows TARGETARCH=amd64 $(MAKE) fuzzer execprog stress
+ env TARGETOS=windows TARGETARCH=amd64 $(MAKE) target
arch_test:
env TARGETOS=test TARGETARCH=64 $(MAKE) executor