mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 01:42:37 +08:00
Currently, we have code in different folders like `flow/` and `fdbrpc/` that should remain isolated. For example, `flow/` files should not include functionality from any other modules. `fdbrpc/` files should only be able to include functionality from itself and from `flow/`. However, when creating a shared library, the linker doesn't complain about undefined symbols -- this only happens when creating an executable. Thus, for example, it is possible to forward declare an `fdbclient` function in an `fdbrpc` file and then use it, and nothing will break (when it should, because this is illegal). This change adds dummy executables for a few modules (`flow`, `fdbrpc`, `fdbclient`) that will cause a linker error if there are included symbols which the linker can't resolve.
9 lines
371 B
C++
9 lines
371 B
C++
// When creating a static or shared library, undefined symbols will be ignored.
|
|
// Since we want to ensure no symbols from other modules are used, each module
|
|
// will create an executable so the linker will throw errors if it can't find
|
|
// the declaration of a symbol. This class defines a dummy main function so the
|
|
// executable can be built.
|
|
int main() {
|
|
return 0;
|
|
}
|