mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Move tor_git_revision into a new module.
At first, we put the tor_git_revision constant in tor_main.c, so that we wouldn't have to recompile config.o every time the git revision changed. But putting it there had unintended side effect of forcing every program that wanted to link libor.a (including test, test-slow, the fuzzers, the benchmarks, etc) to declare their own tor_git_revision instance. That's not very nice, especially since we want to start supporting others who want to link against Tor (see 23846). So, create a new git_revision.c file that only contains this constant, and remove the duplicated boilerplate from everywhere else. Part of implementing ticket 23845.
This commit is contained in:
@@ -3,12 +3,6 @@
|
||||
* Copyright (c) 2007-2017, The Tor Project, Inc. */
|
||||
/* See LICENSE for licensing information */
|
||||
|
||||
extern const char tor_git_revision[];
|
||||
|
||||
/* Ordinarily defined in tor_main.c; this bit is just here to provide one
|
||||
* since we're not linking to tor_main.c */
|
||||
const char tor_git_revision[] = "";
|
||||
|
||||
/**
|
||||
* \file test_common.c
|
||||
* \brief Common pieces to implement unit tests.
|
||||
|
||||
Reference in New Issue
Block a user