已开启
fix: use dyld_fallback_library_path #520
fix: use dyld_fallback_library_path #520
已开启
余敲鱼创建于 5月22日
7 个文件变更+10-10
Mdocs/dev-guide/source_en/Appendix/compile_options.md+1-1
@@ -922,7 +922,7 @@ This feature is temporarily unsupported when compiling for macOS targets.
922 922 
923### `--set-runtime-rpath`923### `--set-runtime-rpath`
924 924 
925-Writes the absolute path of the Cangjie runtime library directory into the RPATH/RUNPATH section of the binary. When this option is used, there is no need to set the Cangjie runtime library directory using `LD_LIBRARY_PATH` (for Linux platforms) or `DYLD_LIBRARY_PATH` (for macOS platforms) when running the Cangjie program in the build environment.925+Writes the absolute path of the Cangjie runtime library directory into the RPATH/RUNPATH section of the binary. When this option is used, there is no need to set the Cangjie runtime library directory using `LD_LIBRARY_PATH` (for Linux platforms) or `DYLD_FALLBACK_LIBRARY_PATH` (for macOS platforms) when running the Cangjie program in the build environment.
926 926 
927This feature is not supported when compiling for Windows targets.927This feature is not supported when compiling for Windows targets.
928 928 
Mdocs/dev-guide/source_en/deploy_and_run/runtime_deploy.md+1-1
@@ -43,7 +43,7 @@ This section describes the deployment of the Cangjie runtime.
433. Execute the following command in the runtime environment to complete the runtime deployment (replace `${CANGJIE_HOME}` with the path to the `cangjie` directory and `${hw_arch}` with the corresponding hardware architecture):433. Execute the following command in the runtime environment to complete the runtime deployment (replace `${CANGJIE_HOME}` with the path to the `cangjie` directory and `${hw_arch}` with the corresponding hardware architecture):
44 44 
45 ```bash45 ```bash
46- export DYLD_LIBRARY_PATH=${CANGJIE_HOME}/runtime/lib/darwin_${hw_arch}_cjnative:${DYLD_LIBRARY_PATH}46+ export DYLD_FALLBACK_LIBRARY_PATH=${CANGJIE_HOME}/runtime/lib/darwin_${hw_arch}_cjnative:${DYLD_FALLBACK_LIBRARY_PATH}
47 ```47 ```
48 48 
49## Windows49## Windows
Mdocs/dev-guide/source_en/multiplatform/cangjie-ios-objc.md+2-2
@@ -275,10 +275,10 @@ Taking Cangjie calling ObjC as an example, the overall development process is de
275 brew install llvm@15275 brew install llvm@15
276 ```276 ```
277 277 
278-3. Add the `llvm@15/lib/` subdirectory to the `DYLD_LIBRARY_PATH` environment variable.278+3. Add the `llvm@15/lib/` subdirectory to the `DYLD_FALLBACK_LIBRARY_PATH` environment variable.
279 279 
280 ```bash280 ```bash
281- export DYLD_LIBRARY_PATH=/opt/homebrew/opt/llvm@15/lib:$DYLD_LIBRARY_PATH281+ export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/opt/llvm@15/lib:$DYLD_FALLBACK_LIBRARY_PATH
282 ```282 ```
283 283 
2844. Verify successful installation: Execute the following command. If the ObjCInteropGen usage instructions appear, the installation was successful.2844. Verify successful installation: Execute the following command. If the ObjCInteropGen usage instructions appear, the installation was successful.
Mdocs/dev-guide/source_en/multiplatform/cjmp-pg-ios.md+2-2
@@ -1510,11 +1510,11 @@ file from the Cangjie open source repository:**
1510 brew install llvm@161510 brew install llvm@16
1511 ```1511 ```
1512 1512 
1513-2. Add the `llvm@16/lib/` subdirectory to the `DYLD_LIBRARY_PATH`1513+2. Add the `llvm@16/lib/` subdirectory to the `DYLD_FALLBACK_LIBRARY_PATH`
1514 environment variable:1514 environment variable:
1515 1515 
1516 ```bash1516 ```bash
1517- export DYLD_LIBRARY_PATH=/opt/homebrew/opt/llvm@16/lib:$DYLD_LIBRARY_PATH1517+ export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/opt/llvm@16/lib:$DYLD_FALLBACK_LIBRARY_PATH
1518 ```1518 ```
1519 1519 
15203. Run the `envsetup.sh` script from the Cangjie SDK.15203. Run the `envsetup.sh` script from the Cangjie SDK.
Mdocs/dev-guide/source_zh_cn/Appendix/compile_options.md+1-1
@@ -909,7 +909,7 @@ cjc --target=arch-os-env --sysroot /usr/sdk/arch-os-env hello.cj -o hello
909 909 
910### `--set-runtime-rpath`910### `--set-runtime-rpath`
911 911 
912-将仓颉运行时库所在目录的绝对路径写入到二进制的 RPATH/RUNPATH 段中,使用该选项后在构建所在环境中运行该仓颉程序时无需再使用 LD_LIBRARY_PATH (适用于 Linux 平台) 或 DYLD_LIBRARY_PATH (适用于 macOS 平台) 设置仓颉运行时库目录。912+将仓颉运行时库所在目录的绝对路径写入到二进制的 RPATH/RUNPATH 段中,使用该选项后在构建所在环境中运行该仓颉程序时无需再使用 LD_LIBRARY_PATH (适用于 Linux 平台) 或 DYLD_FALLBACK_LIBRARY_PATH (适用于 macOS 平台) 设置仓颉运行时库目录。
913 913 
914编译 Windows 目标时不支持使用该功能。914编译 Windows 目标时不支持使用该功能。
915 915 
Mdocs/dev-guide/source_zh_cn/deploy_and_run/runtime_deploy.md+1-1
@@ -43,7 +43,7 @@
433. 请在运行环境执行如下命令完成 `runtime` 的部署(其中 `${CANGJIE_HOME}` 请修改为 `cangjie` 目录所在的路径,`${hw_arch}` 请修改为对应的硬件架构):433. 请在运行环境执行如下命令完成 `runtime` 的部署(其中 `${CANGJIE_HOME}` 请修改为 `cangjie` 目录所在的路径,`${hw_arch}` 请修改为对应的硬件架构):
44 44 
45 ```bash45 ```bash
46- export DYLD_LIBRARY_PATH=${CANGJIE_HOME}/runtime/lib/darwin_${hw_arch}_cjnative:${DYLD_LIBRARY_PATH}46+ export DYLD_FALLBACK_LIBRARY_PATH=${CANGJIE_HOME}/runtime/lib/darwin_${hw_arch}_cjnative:${DYLD_FALLBACK_LIBRARY_PATH}
47 ```47 ```
48 48 
49## Windows49## Windows
Mdocs/dev-guide/source_zh_cn/multiplatform/cangjie-ios-objc.md+2-2
@@ -278,10 +278,10 @@ cjc 自动生成胶水代码需要获取在跨编程语言调用中涉及的 Obj
278 brew install llvm@16278 brew install llvm@16
279 ```279 ```
280 280 
281-3. 将 `llvm@16/lib/` 子目录添加到 `DYLD_LIBRARY_PATH` 环境变量中。281+3. 将 `llvm@16/lib/` 子目录添加到 `DYLD_FALLBACK_LIBRARY_PATH` 环境变量中。
282 282 
283 ```bash283 ```bash
284- export DYLD_LIBRARY_PATH=/opt/homebrew/opt/llvm@16/lib:$DYLD_LIBRARY_PATH284+ export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/opt/llvm@16/lib:$DYLD_FALLBACK_LIBRARY_PATH
285 ```285 ```
286 286 
2874. 检测是否安装成功:执行如下命令,如果出现 ObjCInteropGen 使用说明,则证明安装成功。2874. 检测是否安装成功:执行如下命令,如果出现 ObjCInteropGen 使用说明,则证明安装成功。