-rtsopts has no effect with -shared, so we should emit a warning. See #5373 and #7177. MERGED from commit 9a3c8bd7