Skip to content

OS X Universal Binary Support #2024

Closed
Closed
@ashgti

Description

@ashgti

On OS X a number of libraries are built universally. At the very least, it would be nice to tell rustc if your planning on targeting 32 or 64 bit in case your building against a library that is currently only available as one or the other. Currently, I think the only way of doing this is to specify a host triple at compile time and build the entire system as one or the other. It would be nice to be able to build universally on OS X and support targeting a specific architecture. The gcc and clang both support -m32 or -m64 as a simple solution to specifying the architecture, as well as -arch flags.

With clang and gcc -arch can be used to specify which architectures you want to build for, for example clang foo.c -o foo.o -arch i386 -arch x86_64 -arch ppc will tell the compiler to build a binary that supports 3 different architectures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-driverArea: rustc_driver that ties everything together into the `rustc` compilerC-enhancementCategory: An issue proposing an enhancement or a PR with one.O-macosOperating system: macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions