From 59a603593f06ca2935a376b17a91ec42657f1ef8 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Fri, 14 Apr 2023 00:00:56 +0800 Subject: Set the executable bit on Executable artifact files (#2796) * Set the executable bit on Executable artifact files * Don't zero out other permission bits in makeExecutable --- source/compiler-core/slang-artifact-handler-impl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/compiler-core/slang-artifact-handler-impl.cpp') diff --git a/source/compiler-core/slang-artifact-handler-impl.cpp b/source/compiler-core/slang-artifact-handler-impl.cpp index eb5bfc64a..985aa2337 100644 --- a/source/compiler-core/slang-artifact-handler-impl.cpp +++ b/source/compiler-core/slang-artifact-handler-impl.cpp @@ -238,6 +238,10 @@ SlangResult DefaultArtifactHandler::_createOSFile(IArtifact* artifact, ArtifactK // Write the contents SLANG_RETURN_ON_FAIL(File::writeAllBytes(path, blob->getBufferPointer(), blob->getBufferSize())); + if(artifact->getDesc().kind == ArtifactKind::Executable) + { + SLANG_RETURN_ON_FAIL(File::makeExecutable(path)); + } ComPtr fileRep; -- cgit v1.2.3