[libc] Add hooks for extra options in running hermetic tests (#147931)
Part of #145349. These hooks are required downstream in order to run
hermetic tests. See https://github.com/arm/arm-toolchain/pull/420 for
more context on how this PR will be used.