I don't think the federal government does that at all but please someone correct me. Immigration is a federal issue that gets decided mostly on the federal level. Housing is not a (direct) federal responsibility, again correct me if I'm wrong. The government can give incentives but it can't dictate how much housing needs to be build by the provinces/territories, municipalities, etc.
Here's an example, how the BC government is explicitly trying to get more housing built: https://www2.gov.bc.ca/gov/content/housing-tenancy/local-gov...
Edit: It's actually not that simple as I thought. This is a good read about the topic: https://theconversation.com/housing-is-a-direct-federal-resp...
* (Or in some places like Kyoto and Venice, it's due to over-tourism complaints, but I don't think anywhere in Canada is struggling with that problem.)
A more direct method would be to apply hard caps to the following year's immigration numbers based on the previous year's actual measured housing completions. I think this would much more powerfully align pro-immigration interest groups with pro-housing-construction interest groups, resulting in much more home construction, whereas presently there is substantial conflict between the two (especially landowners who benefit from rising demand for scarce housing).