I have cloned and built (with "make images") a local OpenJDK ("amber" repository). When I try to add the resulting build//images/jdk directory as an SDK, IntelliJIdea does not complain about the directory structure (so it correctly identifies it as a modular JDK), but the Classpath tab is blank, so the resulting configuration is unusable. If I manually add the JDK modules at build//images/jdk/jmods, they show up as ordinary files and are not scanned as module files.
I assume this works for other people, so what am I doing wrong? Wrong build target? Wrong JDK directory? (Note that I am not trying to start IntelliJIdea with an OpenJDK build, just use my local build as a project JDK.)