Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially revert 53b8f126 on linux (#460) #461

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions common_clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ Compile(const char *pszProgramSource, const char **pInputHeaders,
CommonClangInitialize();

try {
#ifdef _WIN32
llvm::sys::SmartScopedLock<true> compileGuard{*compileMutex};
#endif
std::unique_ptr<OCLFEBinaryResult> pResult(new OCLFEBinaryResult());

// Create the clang compiler
Expand All @@ -224,6 +226,9 @@ Compile(const char *pszProgramSource, const char **pInputHeaders,
// Prepare error log
llvm::raw_string_ostream err_ostream(pResult->getLogRef());
{
#ifndef _WIN32
llvm::sys::SmartScopedLock<true> compileGuard{*compileMutex};
#endif
// Parse options
optionsParser.processOptions(pszOptions, pszOptionsEx);

Expand Down Expand Up @@ -342,6 +347,9 @@ Compile(const char *pszProgramSource, const char **pInputHeaders,
err_ostream.flush();
}
{
#ifndef _WIN32
llvm::sys::SmartScopedLock<true> compileGuard{*compileMutex};
#endif
if (pBinaryResult) {
*pBinaryResult = pResult.release();
}
Expand Down