Skip to content

os: implement os.Chtimes #3700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

achille-roussel
Copy link
Contributor

Opening this PR as a draft because I'm running into an issue that someone more familiar with the TinyGo build may be more equipped to solve.

utimes in wasi-libc has a dependency on __builtin_mul_overflow via https://github.com/WebAssembly/wasi-libc/blob/3189cd1ceec8771e8f27faab58ad05d4d6c369ef/libc-bottom-half/cloudlibc/src/common/time.h, which gets translated by LLVM to a call to __muloti4 from compiler-rt, which isn't being linked to tinygo.

$ ./build/tinygo test -target=wasi os
tinygo:wasm-ld: error: /home/achille_roussel/go/src/github.com/achille-roussel/tinygo/lib/wasi-libc/sysroot/lib/wasm32-wasi/libc.a(utimensat.o): undefined symbol: __muloti4
tinygo:wasm-ld: error: /home/achille_roussel/go/src/github.com/achille-roussel/tinygo/lib/wasi-libc/sysroot/lib/wasm32-wasi/libc.a(utimensat.o): undefined symbol: __muloti4
failed to run tool: wasm-ld
FAIL	os	0.000s
error: failed to link /tmp/tinygo1517931148/main: exit status 1

Signed-off-by: Achille Roussel <[email protected]>
@dgryski
Copy link
Member

dgryski commented May 3, 2023

Almost certainly #3501

@achille-roussel
Copy link
Contributor Author

I'm going to close this PR since tinygo has integrated the Go 1.21 changes where os.(*File).Chtimes is implemented.

@achille-roussel achille-roussel deleted the wasi-chtimes branch September 1, 2023 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants