Skip to content

Commit c70286a

Browse files
Update sycl/source/detail/program_manager/program_manager.cpp
Co-authored-by: Steffen Larsen <[email protected]>
1 parent 79ee7c1 commit c70286a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,12 @@ static void appendLinkOptionsFromImage(std::string &LinkOpts,
371371
static const char *LinkOptsEnv = SYCLConfig<SYCL_PROGRAM_LINK_OPTIONS>::get();
372372
// Update only if link options are not overwritten by environment variable
373373
if (!LinkOptsEnv) {
374-
if (!LinkOpts.empty())
375-
LinkOpts += " ";
376374
const char *TemporaryStr = Img.getLinkOptions();
377-
if (TemporaryStr != nullptr)
375+
if (TemporaryStr != nullptr) {
376+
if (!LinkOpts.empty())
377+
LinkOpts += " ";
378378
LinkOpts += std::string(TemporaryStr);
379+
}
379380
}
380381
}
381382

0 commit comments

Comments
 (0)