diff --git a/cmake/ESLangCompiler.cmake b/cmake/ESLangCompiler.cmake
index 548c77b..05b0ed4 100644
--- a/cmake/ESLangCompiler.cmake
+++ b/cmake/ESLangCompiler.cmake
@@ -22,11 +22,6 @@ function(es_deploy_lang_compiler base_uri)
 
     FetchContent_MakeAvailable(${component_name})
     set(compiler_executable ${CMAKE_BINARY_DIR}/_deps/${component_name}-src/${file_name}${CMAKE_EXECUTABLE_SUFFIX})
-
-    if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
-        string(APPEND compiler_executable ".sh")
-    endif()
-
     set(ES_LANG_COMPILER_EXECUTABLE ${compiler_executable} PARENT_SCOPE)
 endfunction()
 
diff --git a/tool/lang-compiler/CMakeLists.txt b/tool/lang-compiler/CMakeLists.txt
index e7b632d..cdb41e5 100644
--- a/tool/lang-compiler/CMakeLists.txt
+++ b/tool/lang-compiler/CMakeLists.txt
@@ -42,6 +42,7 @@ if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
         PRIVATE
         LINKER:--exclude-libs,ALL
         LINKER:-rpath=.
+        LINKER:-rpath=\$ORIGIN
         $<$<CONFIG:RELEASE>:-s>
     )