mirror of
https://github.com/esphome/esphome.git
synced 2026-02-20 08:25:35 -07:00
Expand non-const comment
This commit is contained in:
@@ -22,7 +22,11 @@ namespace esphome {
|
||||
namespace buildinfo {
|
||||
|
||||
// Reference the linker symbols as uintptr_t from the *data* section to
|
||||
// avoid issues with pc-relative relocations on 64-bit platforms.
|
||||
// avoid issues with pc-relative relocations on 64-bit platforms. And
|
||||
// don't let the compiler know they're const or it'll optimise away the
|
||||
// whole thing and emit a relocation to the ESPHOME_XXX symbols above
|
||||
// directly, which defaults the whole point!
|
||||
//
|
||||
// NOLINTBEGIN(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
static uintptr_t config_hash = (uintptr_t) &ESPHOME_CONFIG_HASH;
|
||||
static uintptr_t build_time = (uintptr_t) &ESPHOME_BUILD_TIME;
|
||||
|
||||
Reference in New Issue
Block a user