[ci] Share Generated Assets Across All Platforms (#1074)

This commit is contained in:
David Chavez 2022-08-09 00:02:35 +02:00 committed by GitHub
commit 9b33827d02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 29 deletions

View file

@ -348,11 +348,14 @@ std::string ZResource::GetSourceOutputHeader([[maybe_unused]] const std::string&
str += StringHelper::Sprintf("#define d%s \"__OTR__%s/%s\"", name.c_str(), outName.c_str(), nameStr.c_str());
if (nameSet && nameSet->find(name) == nameSet->end()) {
str += StringHelper::Sprintf(R"(
#ifdef _WIN32
str += StringHelper::Sprintf("\nstatic const __declspec(align(2)) char %s[] = d%s;", name.c_str(), name.c_str());
static const __declspec(align(2)) char %s[] = d%s;
#else
str += StringHelper::Sprintf("\nstatic const char %s[] __attribute__((aligned (2))) = d%s;", name.c_str(), name.c_str());
static const char %s[] __attribute__((aligned (2))) = d%s;
#endif
)", name.c_str(), name.c_str(), name.c_str(), name.c_str());
if (nameSet) {
nameSet->insert(name);
}