Last year, Google said that it will roll out monthly security updates to Nexus phones and tablets for three years from their respective launch dates, and platform updates for "at least two years." The search giant is now listing concrete timelines for when guaranteed support will end for each Nexus phone and tablet, including the Nexus 6P and 5X:

Google guarantees updates for the Nexus line. Currently, phones and tablets with the Nexus name are guaranteed Android version updates for two years from the date the devices first went up for sale at Google Play. For security updates, this guarantee is extended to whichever is the longest amount of time — three years from first availability in Google Play or 18 months after the device stops being sold. A small chart to answer your biggest questions:

Device No guaranteed Android version updates after
Nexus 5X September 2017
Nexus 6P September 2017
Nexus 9 October 2016
Nexus 6 October 2016
Nexus 5 October 2015
Nexus 7 (2013) July 2015
Nexus 10 November 2014

The Nexus 6P and 5X are guaranteed to receive updates until September 2017, which is around the time Android O should be released. The exact timing of the release will determine if those phones are guaranteed to get Android O. This also doesn't mean that the devices will be abandoned, just that any further updates are no longer guaranteed.

Google has done a commendable job of ensuring that its Nexus phones receive two years of updates, which is more than what most manufacturers can claim. Furthermore, all Nexus devices will receive guaranteed security patches for a duration of three years following their launch, which is Google's way of making sure that the phones are protected against any vulnerabilities.

Google has also talked about software updates for Android One phones, stating:

All partners have committed to giving software updates for at least 18 months after the phone's launch. All Android One phones will get at least one major software update and several smaller security updates.