Skip to content

NativeAOT library folder structure hygiene #108649

@JCash

Description

@JCash

Description

Currently, when building a C++ native aot app, you need to specify the runtime libraries with full paths, or clang will automatically choose the the .dylib files.

Reproduction Steps

Use -Lpathtolibs -lSystem.IO.Compression.Native and it will link dynamically, even though I'm looking for a statically linked executable.

This makes maintenance non-standard and more time consuming (and error prone) than needed.

Expected behavior

I'd like the shared libraries in a different folder. E.g. "./shared/" or similar.

Actual behavior

I get a dynamically linked executable.

Regression?

No response

Known Workarounds

The current workaround is to put full absolute paths on the command line to clang.

Configuration

DotNet 9 rc1

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions