Skip to content

--emit=obj for Windows msvc producing .o instead of .obj #37207

Open
@retep998

Description

@retep998
rustc 1.14.0-nightly (19ac57926 2016-10-08)
binary: rustc
commit-hash: 19ac57926abb749a93e2eb84502048d9c57f2d7b
commit-date: 2016-10-08
host: x86_64-pc-windows-msvc
release: 1.14.0-nightly

Doing rustc --emit=obj foo.rs results in foo.o instead of the expected foo.obj.

TODO:

  • Investigate what automation or tools out there rely on --emit=obj using the .o extension and work with the pc-windows-msvc targets.
  • Investigate the feasibility of adjusting such automation or tools to support the .obj extension instead for pc-windows-msvc.
  • Add a obj_suffix to the target options and set it to obj only for pc-windows-msvc targets.
  • Adjust the aforementioned automation and tools and post something in the release notes.

Note that because MSVC is such a different target than GNU targets, any sort of automation or tooling that specifically needs object files would already be quite conditional on MSVC being different to invoke the linker correctly and such. Therefore I am of the opinion that the fallout from this change should be minimal and very easy to fix. If anyone can find any examples that prove me wrong, please do so.

Places to search for potential automation or tools: https://github.com/search?utf8=%E2%9C%93&q=--emit+obj&type=Code&ref=searchresults

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-windowsOperating system: WindowsO-windows-msvcToolchain: MSVC, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions