Skip to content

Fix flatcc path for Windows #8970

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

Merged
merged 1 commit into from
Mar 6, 2025
Merged

Fix flatcc path for Windows #8970

merged 1 commit into from
Mar 6, 2025

Conversation

SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented Mar 5, 2025

Summary

This PR is based on #4993 but includes an additional fix to use the correct equivalent of the rm -rf command for Windows.

Test plan

Built ExecuTorch for Windows using the following command:

del -Recurse -Force cmake-out; `
  cmake . `
  -DCMAKE_INSTALL_PREFIX=cmake-out `
  -DPYTHON_EXECUTABLE=C:\\Users\\ssjia\\AppData\\Local\\miniconda3\\python.exe `
  -DCMAKE_PREFIX_PATH=C:\\Users\\ssjia\\AppData\\Local\\miniconda3\\Lib\\site-packages `
  -DCMAKE_BUILD_TYPE=Release `
  -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON `
  -T ClangCL `
  -Bcmake-out; `
  cmake --build cmake-out -j64 --target install

Copy link

pytorch-bot bot commented Mar 5, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8970

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit fce39dc with merge base 6eee931 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 5, 2025
@SS-JIA SS-JIA requested review from jackzhxng and removed request for tarun292 March 5, 2025 20:05
@SS-JIA SS-JIA added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Mar 5, 2025
@SS-JIA SS-JIA requested a review from tarun292 March 5, 2025 20:51
@@ -159,6 +163,15 @@ file(MAKE_DIRECTORY
${_program_schema__include_dir}/executorch/devtools/bundled_program
)

message("Hello")
message("${CMAKE_GENERATOR}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, good catch :p

if(WIN32)
set(RM_COMMAND rmdir /s /q)
else()
set(RM_COMMAND rm -rf)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm -rf in a cmakefile makes me a little uneasy, why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know; rm -rf was being used before my changes. Here I'm simply switching it to use a cmd.exe equivalent for Windows. I can change it to rm -r if that's more reasonable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok looks like it was there before, so hopefully should be fine i guess

@SS-JIA SS-JIA force-pushed the ssj_flatcc_path branch from 71315f9 to bb9132d Compare March 6, 2025 16:56
@SS-JIA
Copy link
Contributor Author

SS-JIA commented Mar 6, 2025

  • Removed debug logging
  • Removed force flags from rm commands

cc: @tarun292

@SS-JIA SS-JIA force-pushed the ssj_flatcc_path branch from bb9132d to fce39dc Compare March 6, 2025 21:01
@SS-JIA
Copy link
Contributor Author

SS-JIA commented Mar 6, 2025

test failure is most probably unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants