-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Move API notes out of the arch-specific subdirectories in lib/swift/ #21690
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
Conversation
@swift-ci Please clean test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so much simpler, thank you!
apinotes/CMakeLists.txt
Outdated
"${CMAKE_CURRENT_SOURCE_DIR}/${input}" | ||
"${output_dir}/${input}" | ||
COMMAND | ||
"${CMAKE_COMMAND}" "-E" "touch" "${output_dir}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, this copy/touch dance is me trying and failing to overcome the limitation I talked about in the description. I'll put it back to copy_if_different
when the full tests pass.
9ada70a
to
4fa2e36
Compare
@swift-ci Please smoke test |
@swift-ci Please Build Toolchain macOS Platform |
macOS Toolchain Install command |
Hm, turns out it's a good thing I built the Linux toolchain by accident too: this new logic copies the apinotes/ directory into Linux toolchains too, which is unnecessary. |
"${CMAKE_CURRENT_SOURCE_DIR}/${input}" | ||
"${output_dir}/${input}" | ||
COMMENT "Copying ${input} to ${output_dir}") | ||
list(APPEND outputs "${output_dir}/${input}") | ||
endforeach() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that we have a new enough CMake to avoid this. Please use a single command (${CMAKE_COMMAND_} -E copy_if_different ${sources} ${output_dir}/
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way allows CMake/Ninja to only copy the files that changed, but I guess copy_if_different
will already do that, and N is very small.
They're all the same anyway, and no longer even need to be compiled, just copied in as text. And drastically simplify how we "generate" them. Instead of attaching their build jobs to the appropriate overlays, if present, "just" have one job to copy them all and attach it to the Darwin overlay. That's what we do for the overlay shim headers, and it's good enough. (Eventually we want to get out of the business of shipping them altogether.) This does have the same flaw as the shim headers: if you /just/ change API notes, the corresponding overlay does not get rebuilt. You have to touch that too. But in practice that'll happen most of the time anyway. Part of rdar://problem/43545560
4fa2e36
to
44da197
Compare
@swift-ci Please build toolchain |
@swift-ci Please smoke test |
They're all the same anyway, and no longer even need to be compiled, just copied in as text.
And drastically simplify how we "generate" them. Instead of attaching their build jobs to the appropriate overlays, if present, "just" have one job to copy them all and attach it to the Darwin overlay. That's what we do for the overlay shim headers, and it's good enough. (Eventually we want to get out of the business of shipping them altogether.)
This does have the same flaw as the shim headers: if you just change API notes, the corresponding overlay does not get rebuilt. You have to touch that too. But in practice that'll happen most of the time anyway.
Part of rdar://problem/43545560