Skip to content
Permalink
Browse files

sys/sys-extract: update import path for fuchsia.

Apparently, sysroot/include doesn't exist in the build-zircon path
anymore. I changed the path in sys-extract to make it point to the
exported sdk include path.

I also ran make extract and make generate to add new fidl definitions.

TEST=ran make extract and make generate.
  • Loading branch information...
mvanotti authored and dvyukov committed Mar 27, 2019
1 parent 69e1a4f commit 70d776a21acfa3a596bff57fc1a9a4f7998bd4a8
Showing with 18 additions and 5 deletions.
  1. +2 −2 executor/defs.h
  2. +5 −0 sys/fuchsia/fidl_io.txt
  3. +5 −1 sys/fuchsia/gen/amd64.go
  4. +5 −1 sys/fuchsia/gen/arm64.go
  5. +1 −1 sys/syz-extract/fuchsia.go
@@ -35,7 +35,7 @@

#if GOARCH_amd64
#define GOARCH "amd64"
#define SYZ_REVISION "020338cc7e797e47ecbbe68691c0954e831070f4"
#define SYZ_REVISION "53a9f9ccfb936496d3174c752169fd2d6c0b8fed"
#define SYZ_EXECUTOR_USES_FORK_SERVER 0
#define SYZ_EXECUTOR_USES_SHMEM 0
#define SYZ_PAGE_SIZE 4096
@@ -45,7 +45,7 @@

#if GOARCH_arm64
#define GOARCH "arm64"
#define SYZ_REVISION "6bfd73c3be80297b5e5295deeb2b1cdc93cda43b"
#define SYZ_REVISION "482a8647177a568228ca57dd3d0f4cde6dfb38bd"
#define SYZ_EXECUTOR_USES_FORK_SERVER 0
#define SYZ_EXECUTOR_USES_SHMEM 0
#define SYZ_PAGE_SIZE 4096
@@ -30,6 +30,10 @@ fuchsia_io_DeviceHandles {
event zx_event
} [packed]

fuchsia_io_TtyHandles {
event zx_event
} [packed]

fuchsia_io_NodeAttributesInLine {
mode int32
id int64
@@ -59,6 +63,7 @@ fuchsia_io_NodeInfoHandles [
pipe fuchsia_io_PipeHandles
vmofile fuchsia_io_VmofileHandles
device fuchsia_io_DeviceHandles
tty fuchsia_io_TtyHandles
] [varlen]

fuchsia_io_NodeCloneRequest {
&StructType{Key: StructKey{Name: "fuchsia_io_PipeHandles", Dir: 1}, FldName: "pipe"},
&StructType{Key: StructKey{Name: "fuchsia_io_VmofileHandles", Dir: 1}, FldName: "vmofile"},
&StructType{Key: StructKey{Name: "fuchsia_io_DeviceHandles", Dir: 1}, FldName: "device"},
&StructType{Key: StructKey{Name: "fuchsia_io_TtyHandles", Dir: 1}, FldName: "tty"},
}}},
{Key: StructKey{Name: "fuchsia_io_NodeIoctlRequest"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fuchsia_io_NodeIoctlRequest", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "fidl_message_header[905161895]"}, FldName: "hdr"},
{Key: StructKey{Name: "fuchsia_io_ServiceHandles", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fuchsia_io_ServiceHandles", ArgDir: 1}, Fields: []Type{
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "void", ArgDir: 1}, Kind: 1},
}}},
{Key: StructKey{Name: "fuchsia_io_TtyHandles", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fuchsia_io_TtyHandles", TypeSize: 4, ArgDir: 1}, Fields: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "zx_event", FldName: "event", TypeSize: 4, ArgDir: 1}},
}}},
{Key: StructKey{Name: "fuchsia_io_VmofileHandles", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fuchsia_io_VmofileHandles", TypeSize: 4, ArgDir: 1}, Fields: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "zx_vmo", FldName: "vmo", TypeSize: 4, ArgDir: 1}},
}}},
{Name: "fuchsia_power_Status_OK"},
}

const revision_amd64 = "020338cc7e797e47ecbbe68691c0954e831070f4"
const revision_amd64 = "53a9f9ccfb936496d3174c752169fd2d6c0b8fed"
&StructType{Key: StructKey{Name: "fuchsia_io_PipeHandles", Dir: 1}, FldName: "pipe"},
&StructType{Key: StructKey{Name: "fuchsia_io_VmofileHandles", Dir: 1}, FldName: "vmofile"},
&StructType{Key: StructKey{Name: "fuchsia_io_DeviceHandles", Dir: 1}, FldName: "device"},
&StructType{Key: StructKey{Name: "fuchsia_io_TtyHandles", Dir: 1}, FldName: "tty"},
}}},
{Key: StructKey{Name: "fuchsia_io_NodeIoctlRequest"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fuchsia_io_NodeIoctlRequest", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "fidl_message_header[905161895]"}, FldName: "hdr"},
{Key: StructKey{Name: "fuchsia_io_ServiceHandles", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fuchsia_io_ServiceHandles", ArgDir: 1}, Fields: []Type{
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "void", ArgDir: 1}, Kind: 1},
}}},
{Key: StructKey{Name: "fuchsia_io_TtyHandles", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fuchsia_io_TtyHandles", TypeSize: 4, ArgDir: 1}, Fields: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "zx_event", FldName: "event", TypeSize: 4, ArgDir: 1}},
}}},
{Key: StructKey{Name: "fuchsia_io_VmofileHandles", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fuchsia_io_VmofileHandles", TypeSize: 4, ArgDir: 1}, Fields: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "zx_vmo", FldName: "vmo", TypeSize: 4, ArgDir: 1}},
}}},
{Name: "fuchsia_power_Status_OK"},
}

const revision_arm64 = "6bfd73c3be80297b5e5295deeb2b1cdc93cda43b"
const revision_arm64 = "482a8647177a568228ca57dd3d0f4cde6dfb38bd"
@@ -27,7 +27,7 @@ func (*fuchsia) processFile(arch *Arch, info *compiler.ConstInfo) (map[string]ui
dir := arch.sourceDir
headerArch := arch.target.KernelHeaderArch
cc := filepath.Join(dir, "buildtools", "linux-x64", "clang", "bin", "clang")
includeDir := filepath.Join(dir, "out", "build-zircon", "build-"+headerArch, "sysroot", "include")
includeDir := filepath.Join(dir, "out", headerArch, "sdk", "exported", "zircon_sysroot", "arch", headerArch, "sysroot", "include")
args := []string{"-fmessage-length=0", "-I" + includeDir}
fidlingDir := filepath.Join(dir, "out", headerArch, "fidling", "gen")
args = append(args, "-I"+fidlingDir)

0 comments on commit 70d776a

Please sign in to comment.
You can’t perform that action at this time.