-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unneeded exports of constants
cloud_policy_constants.h defines 60 constants and (in component builds) exports them. This implies that consumers of these constants should include the header file and then link against the DLLs/shared-objects that export the symbols. However in at least 35 places the source_set components/policy/core/common:common_constants is imported directly, which means that the constants are compiled into each DLL/shared-object individually, rather than being imported. This leads to each individual DLL/shared-object exporting the constants, but nobody importing them. The same issue was found in two other policy header files, for a total of 88 exported constants. Since these are constants it is simpler and more efficient to skip the import/export behavior and just declare them. Each DLL/shared-object can have their own copy, and all is well. In one case in chrome/updater/BUILD.gn the source_set base was actually using the constants without compiling them in. It was much simpler to change that usage to import them rather than to change the other 35 uses. This issue was found when I noticed that unit_tests.exe was exporting more than 230 symbols. chrome.dll exports a similar set of inappropriate symbols, and probably other binaries as well. Bug: 1424799 Change-Id: Ifedba841d46fda195c9ae0b8f00bca750400d8cd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4342816 Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Nicolas Ouellet-Payeur <nicolaso@chromium.org> Reviewed-by: S Ganesh <ganesh@chromium.org> Cr-Commit-Position: refs/heads/main@{#1118206}
- Loading branch information
1 parent
8495060
commit fd56a13
Showing
4 changed files
with
96 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters