-external-library-path+=my.swc is the answer, though there is no need for using -runtime-shared-libraries. Using this argument allows you to specify code which will be used in compilation but not placed into the swc. Obviously this excluded clode will still be needed when the swc is used.
Of particular note is that unlike other arguments, -external-library-path uses += not =. By using just = you will break the refernce to the players low level classes and any other external libraries added.
If you are using FlexTasks w/ Ant, your target might look like this:
<target name="compileToSWC">
<compc
output="${bin}/${SWCName}">
<source-path path-element="${src}"/>
<!-- Source to include in SWC -->
<include-sources dir="${src}" includes="*"/>
<!-- Libs to exclude from the swc - Note append="true" which is equivillant to using +=-->
<external-library-path file="${thirdparty.libs}/SomeLib.swc" append="true"/>
<external-library-path file="${thirdparty.libs}/SomeOtherLib.swc" append="true"/>
</compc>
</target>
You can also point external-library-path to a folder in which case it will include all swcs inside. Note that if you follow Adobe's FlexTasks guidelines and place the flexTasks.jar file into your libs folder and target it as a folder using external-library-path, the flexTasks.jar is itself excluded, causing the build to fail. To solve this, either place the flexTasks.jar in a separate folder or target your swcs directly as in the above example