Skip to content

Bug in std.build.LibExeObjStep.setTarget #4555

Closed
@joachimschmidt557

Description

@joachimschmidt557

When compiling https://github.com/andrewrk/tetris/tree/27d0d0ec085e1ac0c9cae6092f807a318b15dd44 with the newest zig from master, this error occurs:

/home/joachim/src/zig/build/lib/zig/std/build.zig:1294:17: error: no member named 'arch' in struct 'std.target.Cross'
                .arch = target_arch,
                ^

The code assigns a value to .arch even though std.target.Target.Cross doesn't have this field.

        return self.setTheTarget(Target{
            .Cross = CrossTarget{
                .arch = target_arch,
                .os = target_os,
                .abi = target_abi,
                .cpu_features = target_arch.getBaselineCpuFeatures(),
            },
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorzig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions