diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-04-14 00:00:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-14 00:00:56 +0800 |
| commit | 59a603593f06ca2935a376b17a91ec42657f1ef8 (patch) | |
| tree | 16147c6952e526c536597c816bf7ccc4f40f94cd /source/compiler-core/slang-artifact-handler-impl.cpp | |
| parent | c7e5601bb67d2a5ebadb7f84c6968b5912e7566d (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.cpp | 4 |
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; |
