Checker updates for LTO, etc.
- Apr 24, 2024
-
-
scott snyder authored
In the cmake builds, the -fplugin switch will be given for both the compile and link steps. Normally, when that switch is given during linking, it will not have any effect. But if link-time optimization (LTO) is being done, then the compiler will run at link time and the plugin gets loaded. The problem then is that it's not the full compiler that runs, but only the middle/backend. If the plugin references symbols from the frontend, then it will fail to load during the link step, causing the link to fail. (gcc will load the plugin with RTLD_NOW.) To resolve this, we launder references to FE symbols through the shims defined here, which access the symbols via dlsym(). If the first symbol is missing then we return gracefully and disable the checkers.
2dc3d98d -
scott snyder authored
The free_lang_data pass runs just after gimplification (and before the conversion to SSA). Normally, it doesn't do much, but if LTO is enabled, then it will free the C++-specific parts from the types and declarations. However, the thread checker relies on this information. Further, dataflow analysis requires that the SSA conversion has taken place, so we can't just shift it to before free_lang_data. But it doesn't really matter that much exactly where free_lang_data runs, so we instead move it to slightly later, after the checker runs.
db4b2598 -
scott snyder authored
Add tests for compiling with LTO on, and a test for linking with LTO. Also update C++ standard selection to C++20.
c7359ade
-
- Apr 04, 2024
-
-
scott snyder authored
Drop support for gcc versions before 9.
6613c97a -
scott snyder authored
Fixes to work with gcc14.
7bb4228d
-