Skip to content

Commit

Permalink
Update settings usage for null values.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Feb 11, 2020
1 parent e1e4e00 commit 76ca211
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sw/driver/target/native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ void NativeCompiledTarget::findCompiler()
Linker->Extension = getBuildSettings().TargetOS.getSharedLibraryExtension();

// c++ goes first for correct include order
if (!libstdcppset && getSettings()["native"]["stdlib"]["cpp"])
if (!libstdcppset && getSettings()["native"]["stdlib"]["cpp"].isValue())
{
if (IsSwConfig && getBuildSettings().TargetOS.is(OSType::Linux))
{
Expand All @@ -662,7 +662,7 @@ void NativeCompiledTarget::findCompiler()
}

// goes last
if (getSettings()["native"]["stdlib"]["c"])
if (getSettings()["native"]["stdlib"]["c"].isValue())
*this += UnresolvedPackage(getSettings()["native"]["stdlib"]["c"].getValue());

// compiler runtime
Expand All @@ -678,7 +678,7 @@ void NativeCompiledTarget::findCompiler()
}

// kernel headers
if (getSettings()["native"]["stdlib"]["kernel"])
if (getSettings()["native"]["stdlib"]["kernel"].isValue())
*this += UnresolvedPackage(getSettings()["native"]["stdlib"]["kernel"].getValue());
}

Expand Down Expand Up @@ -2312,7 +2312,7 @@ void NativeCompiledTarget::prepare_pass2()

// force cpp standard
// some stdlibs require *minimal* cpp std to be set
if (getSettings()["native"]["stdlib"]["cpp"] &&
if (getSettings()["native"]["stdlib"]["cpp"].isValue() &&
UnresolvedPackage(getSettings()["native"]["stdlib"]["cpp"].getValue()).getPath() == "com.Microsoft.VisualStudio.VC.libcpp")
{
for (auto &d : getActiveDependencies())
Expand Down

0 comments on commit 76ca211

Please sign in to comment.