Skip to content

Commit

Permalink
syz/syz-extract: Update Fuchsia extractor with current Fuchsia paths.
Browse files Browse the repository at this point in the history
A change in Zircon a while back moved around where sysroots are located
in Fuchsia; this update will allow for proper extraction.
  • Loading branch information
flowerhack authored and dvyukov committed Feb 4, 2018
1 parent 632a8c2 commit a1bc9d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Expand Up @@ -15,6 +15,7 @@ Google Inc.
Willem de Bruijn
Eric Biggers
Atul Prakash
Julia Hansbrough
Baozeng Ding
Lorenzo Stoakes
Jeremy Huang
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -52,9 +52,9 @@ ifeq ("$(TARGETOS)", "fuchsia")
export CGO_ENABLED=1
NOSTATIC = 1
ifeq ("$(TARGETARCH)", "amd64")
ADDCFLAGS = --target=x86_64-fuchsia -lfdio -lzircon --sysroot $(SOURCEDIR)/out/build-zircon/build-zircon-pc-x86-64/sysroot -I $(SOURCEDIR)/out/build-zircon/build-zircon-pc-x86-64
ADDCFLAGS = --target=x86_64-fuchsia -lfdio -lzircon --sysroot $(SOURCEDIR)/out/build-zircon/build-user-x86-64/sysroot -I $(SOURCEDIR)/out/build-zircon/build-user-x86-64
else ifeq ("$(TARGETARCH)", "arm64")
ADDCFLAGS = --target=aarch64-fuchsia -lfdio -lzircon --sysroot $(SOURCEDIR)/out/build-zircon/build-zircon-pc-arm64/sysroot -I $(SOURCEDIR)/out/build-zircon/build-zircon-pc-arm64
ADDCFLAGS = --target=aarch64-fuchsia -lfdio -lzircon --sysroot $(SOURCEDIR)/out/build-zircon/build-user-arm64/sysroot -I $(SOURCEDIR)/out/build-zircon/build-user-arm64
endif
endif

Expand Down
2 changes: 1 addition & 1 deletion sys/syz-extract/fuchsia.go
Expand Up @@ -26,7 +26,7 @@ func (*fuchsia) prepareArch(arch *Arch) error {
func (*fuchsia) processFile(arch *Arch, info *compiler.ConstInfo) (map[string]uint64, map[string]bool, error) {
dir := arch.sourceDir
cc := filepath.Join(dir, "buildtools", "linux-x64", "clang", "bin", "clang")
includeDir := filepath.Join(dir, "out", "build-zircon", "build-zircon-pc-x86-64", "sysroot", "include")
includeDir := filepath.Join(dir, "out", "build-zircon", "build-user-x86-64", "sysroot", "include")
args := []string{"-fmessage-length=0", "-I" + includeDir}
for _, incdir := range info.Incdirs {
args = append(args, "-I"+filepath.Join(dir, incdir))
Expand Down

0 comments on commit a1bc9d4

Please sign in to comment.