fix collect2 ld error with hotpatching (#4771)
* get repro case * disable --with-deps for playwright * extend hotpatch with better path
This commit is contained in:
1 parent
16bbabb3e3
commit
01db142750
2 files changed
+25
-4
No files matched your search
@@ -258,10 +258,9 @@ jobs:
|
|||||||
# The hot patch test requires incremental compilation
|
# The hot patch test requires incremental compilation
|
||||||
CARGO_INCREMENTAL: 1
|
CARGO_INCREMENTAL: 1
|
||||||
run: |
|
run: |
|
||||||
export PATH=$PATH:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
|
|
||||||
npm ci
|
npm ci
|
||||||
npm install -D @playwright/test
|
npm install -D @playwright/test
|
||||||
npx playwright install --with-deps
|
npx playwright install
|
||||||
npx playwright test
|
npx playwright test
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
@@ -1715,6 +1715,17 @@ impl BuildRequest {
|
|||||||
out_args = vec![format!("@{}", self.windows_command_file().display()).into()];
|
out_args = vec![format!("@{}", self.windows_command_file().display()).into()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add more search paths for the linker
|
||||||
|
let mut command_envs = rustc_args.envs.clone();
|
||||||
|
|
||||||
|
// On linux, we need to set a more complete PATH for the linker to find its libraries
|
||||||
|
if cfg!(target_os = "linux") {
|
||||||
|
command_envs.push((
|
||||||
|
"PATH".to_string(),
|
||||||
|
"/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin".to_string(),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
// Run the linker directly!
|
// Run the linker directly!
|
||||||
//
|
//
|
||||||
// We dump its output directly into the patch exe location which is different than how rustc
|
// We dump its output directly into the patch exe location which is different than how rustc
|
||||||
@@ -1722,7 +1733,7 @@ impl BuildRequest {
|
|||||||
let res = Command::new(linker)
|
let res = Command::new(linker)
|
||||||
.args(out_args)
|
.args(out_args)
|
||||||
.env_clear()
|
.env_clear()
|
||||||
.envs(rustc_args.envs.iter().map(|(k, v)| (k, v)))
|
.envs(command_envs)
|
||||||
.output()
|
.output()
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
@@ -2235,11 +2246,22 @@ impl BuildRequest {
|
|||||||
out_args = vec![format!("@{}", self.windows_command_file().display())];
|
out_args = vec![format!("@{}", self.windows_command_file().display())];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add more search paths for the linker
|
||||||
|
let mut command_envs = rustc_args.envs.clone();
|
||||||
|
|
||||||
|
// On linux, we need to set a more complete PATH for the linker to find its libraries
|
||||||
|
if cfg!(target_os = "linux") {
|
||||||
|
command_envs.push((
|
||||||
|
"PATH".to_string(),
|
||||||
|
"/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin".to_string(),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
// Run the linker directly!
|
// Run the linker directly!
|
||||||
let res = Command::new(linker)
|
let res = Command::new(linker)
|
||||||
.args(out_args)
|
.args(out_args)
|
||||||
.env_clear()
|
.env_clear()
|
||||||
.envs(rustc_args.envs.iter().map(|(k, v)| (k, v)))
|
.envs(command_envs)
|
||||||
.output()
|
.output()
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user