How to make the sun lamp not the HDR cast shadow in Cycles?
Starting with a scene like this where one layer has a cube and a sphere are being lit by HDRI only.

The sphere has the shadows disabled in the cycles settings



On a separate layer containing the plane, a copy of the sphere with the shadows enabled and a sun light.

Create two render layers, one that uses the environment, and a second one that does not, and has the shadow pass enabled:





Combine the shadows on the compositor.