HomePhabricator

[llvm-jitlink] Add -phony-externals option to suppress unresolved externals.

Authored by lhames on Sat, Aug 1, 5:44 PM.

Description

[llvm-jitlink] Add -phony-externals option to suppress unresolved externals.

The -phony-externals option adds a generator which explicitly defines any
otherwise unresolved externals as null. This transforms link-time
unresolved-symbol errors into potential runtime null pointer accesses
(if an unresolved external is actually accessed during execution).

This option can be useful in -harness mode to avoid having to mock a
large number of symbols that are not reachable at runtime (e.g. unused
methods referenced by a class vtable).

Details

Committed
lhamesSat, Aug 1, 6:33 PM
Parents
rGe12a028ed3ed: [llvm-jitlink] Support promotion of ODR weak symbols in -harness mode.
Branches
Unknown
Tags
Unknown