Skip to content

Unexpected compiler error when building std for custom Windows target #81228

Open
@MarnixKuijs

Description

@MarnixKuijs

When building the standard library for a custom Windows target I get unexpected compiler errors. The errors appear when compiling the compiler_builtins crate. When looking into compiler_builtins there is a cfg to prevent the file at fault from compiling on Windows platforms. As far as my knowledge goes this cfg directive should work as long as the target_family is Windows, which is set to inside of the target json. When my target is set to x86_64-pc-windows-msvc everything compiles fine.

Meta

Rustc: 1.49.0
Compiling: stable branch
Backtrace

error: unknown directive
            .pushsection .text.__rust_probestack
            ^
error: expected absolute expression
            .type  __rust_probestack, @function
                   ^
error: unknown directive
            .hidden __rust_probestack
            ^
error: unknown directive
            .size __rust_probestack, . - __rust_probestack
            ^
error: unknown directive
            .popsection
            ^
error: unknown directive
            .pushsection .text.__rust_probestack
            ^
error: expected absolute expression
            .type  __rust_probestack, @function
                   ^
error: unknown directive
            .hidden __rust_probestack
            ^
error: unknown directive
            .size __rust_probestack, . - __rust_probestack
            ^
error: unknown directive
            .popsection
            ^
error: unknown directive
  |
note: instantiated into assembly here
 --> <inline asm>:2:13
  |
2 |             .pushsection .text.__rust_probestack
  |             ^

error: expected absolute expression
  |
note: instantiated into assembly here
 --> <inline asm>:4:20
  |
4 |             .type  __rust_probestack, @function
  |                    ^

error: unknown directive
  |
note: instantiated into assembly here
 --> <inline asm>:5:13
  |
5 |             .hidden __rust_probestack
  |             ^

error: unknown directive
   |
note: instantiated into assembly here
  --> <inline asm>:57:13
   |
57 |             .size __rust_probestack, . - __rust_probestack
   |             ^

error: unknown directive
   |
note: instantiated into assembly here
  --> <inline asm>:58:13
   |
58 |             .popsection
   |             ^

error: aborting due to 5 previous errors

error: could not compile `compiler_builtins`

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-target-specsArea: Compile-target specificationsC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions