Using API notes

I'm struggling to use API notes:

I have a target which depends on a systemLibrary target named Clib. The latter has a modulemap and an API notes file, which contains just:

Name: Clib
Functions:
- Name: lib_doSomething
  SwiftName: doSomething

My target also includes the following swiftSetting, as I could not find a way to add it directly to the systemLibrary target:

.unsafeFlags(["-Xcc", "-fapinotes-modules"])

The compiler seems to be aware of my API notes file, as it reports errors in it, but it has no effect (the rename does not happen).

Am I missing a step somewhere to get the API notes to take effect?

Update: The API notes seem to work for declaration that I put into the umbrella header myself, but not for declarations that are imported from the system library.