summaryrefslogtreecommitdiffstats
path: root/source/compiler-core/slang-artifact-handler-impl.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-04-14 00:00:56 +0800
committerGitHub <noreply@github.com>2023-04-14 00:00:56 +0800
commit59a603593f06ca2935a376b17a91ec42657f1ef8 (patch)
tree16147c6952e526c536597c816bf7ccc4f40f94cd /source/compiler-core/slang-artifact-handler-impl.cpp
parentc7e5601bb67d2a5ebadb7f84c6968b5912e7566d (diff)
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
Diffstat (limited to 'source/compiler-core/slang-artifact-handler-impl.cpp')
-rw-r--r--source/compiler-core/slang-artifact-handler-impl.cpp4
1 files changed, 4 insertions, 0 deletions
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<IOSFileArtifactRepresentation> fileRep;