Skip to content

Commit

Permalink
Allows shared libraries on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
johnno1962 authored and gmilos committed Aug 29, 2017
1 parent c4c6a82 commit 40c82b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Driver/ToolChains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@ toolchains::GenericUnix::constructInvocation(const LinkJobAction &job,
Arguments.push_back(context.Args.MakeArgString(A->getValue()));
}

if (getTriple().getOS() == llvm::Triple::Linux && !getTriple().isAndroid()) {
if (getTriple().getOS() == llvm::Triple::Linux && job.getKind() != LinkKind::DynamicLibrary) {
Arguments.push_back("-pie");
}

Expand Down

0 comments on commit 40c82b6

Please sign in to comment.