Skip to content

Commit

Permalink
Set empty source by default. Useful for local overrides.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Apr 6, 2024
1 parent e9411a7 commit 8f02501
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sw/driver/target/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ Target::Target(TargetBase &parent, const PackageId &pkg)

if (auto t0 = dynamic_cast<const Target*>(&parent))
source = t0->source ? t0->source->clone() : nullptr;
// set as default source to prevent missing source errors
if (!source)
source = std::make_unique<EmptySource>();

// sdir
if (!isLocal())
Expand Down

0 comments on commit 8f02501

Please sign in to comment.