Device ID in build time and/or runtime

How can I know the device ID in build time (for use as a #define) or in runtime if there's no way during build time?

My use case is I have two photons. Each has its own led strip it's connected to, each strip in a different amount of pixels.
Since I need to define the length of the led strip I need to somehow have a different value for each of the photons.

At runtime via System.deviceID()

And for build time you can use CLI or a serial connection to request it from the device.