зеркало из https://github.com/mono/CppSharp.git
Workaround parsing GNU system headers with GCC 11.0 version.
Closes https://github.com/mono/CppSharp/issues/1703. Upstream bugs: https://github.com/llvm/llvm-project/issues/51607 https://github.com/llvm/llvm-project/issues/53152
This commit is contained in:
Родитель
25e2c7c0aa
Коммит
4581c2ca5f
|
@ -240,9 +240,11 @@ namespace CppSharp.Parser
|
|||
GetUnixCompilerInfo(headersPath, out var compiler, out var longVersion, out var shortVersion);
|
||||
|
||||
AddSystemIncludeDirs(BuiltinsDir);
|
||||
AddArguments($"-fgnuc-version={longVersion}");
|
||||
|
||||
var majorVersion = shortVersion.Split('.')[0];
|
||||
// Workaround https://github.com/llvm/llvm-project/issues/53152, remove once bug is fixed.
|
||||
AddArguments(int.Parse(majorVersion) >= 11 ? $"-fgnuc-version=10.1" : $"-fgnuc-version={longVersion}");
|
||||
|
||||
string[] versions = { longVersion, shortVersion, majorVersion };
|
||||
string[] triples = { "x86_64-linux-gnu", "x86_64-pc-linux-gnu" };
|
||||
if (compiler == "gcc")
|
||||
|
|
Загрузка…
Ссылка в новой задаче