Skip to content
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

Allow setting C++ standard with standard in swift test targets #140

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

peddie
Copy link
Contributor

@peddie peddie commented Oct 16, 2024

This is already supported in swift_cc_library and swift_cc_tool.

@peddie
Copy link
Contributor Author

peddie commented Oct 16, 2024

Hm, I get a bunch of:


Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error: invalid argument '-std=c++14' not allowed with 'C'
ERROR: /home/peddie/.cache/bazel/_bazel_peddie/d44546e2b755e65528d263d98d986bf0/external/starling/rtklib_rtcm/BUILD.bazel:3:22: Compiling rtklib_rtcm/src/rtcm3e.c failed: (Exit 1): clang failed: error executing command (from target @starling//rtklib_rtcm:rtklib_rtcm) external/rules_swiftnav/cc/toolchains/llvm/x86_64-linux/wrappers/clang -U_FORTIFY_SOURCE '--target=x86_64-unknown-linux-gnu' -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer ... (remaining 159 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error: invalid argument '-std=c++14' not allowed with 'C'
ERROR: /home/peddie/.cache/bazel/_bazel_peddie/d44546e2b755e65528d263d98d986bf0/external/starling/rtklib_rtcm/BUILD.bazel:3:22: Compiling rtklib_rtcm/src/rtklib_igs/rtklib_preceph.c failed: (Exit 1): clang failed: error executing command (from target @starling//rtklib_rtcm:rtklib_rtcm) external/rules_swiftnav/cc/toolchains/llvm/x86_64-linux/wrappers/clang -U_FORTIFY_SOURCE '--target=x86_64-unknown-linux-gnu' -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer ... (remaining 159 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error: invalid argument '-std=c++14' not allowed with 'C'
ERROR: /home/peddie/.cache/bazel/_bazel_peddie/d44546e2b755e65528d263d98d986bf0/external/starling/rtklib_rtcm/BUILD.bazel:3:22: Compiling rtklib_rtcm/src/rtcm.c failed: (Exit 1): clang failed: error executing command (from target @starling//rtklib_rtcm:rtklib_rtcm) external/rules_swiftnav/cc/toolchains/llvm/x86_64-linux/wrappers/clang -U_FORTIFY_SOURCE '--target=x86_64-unknown-linux-gnu' -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer ... (remaining 159 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error: invalid argument '-std=c++14' not allowed with 'C'
ERROR: /home/peddie/.cache/bazel/_bazel_peddie/d44546e2b755e65528d263d98d986bf0/external/starling/rtklib_rtcm/BUILD.bazel:3:22: Compiling rtklib_rtcm/src/rtcm3.c failed: (Exit 1): clang failed: error executing command (from target @starling//rtklib_rtcm:rtklib_rtcm) external/rules_swiftnav/cc/toolchains/llvm/x86_64-linux/wrappers/clang -U_FORTIFY_SOURCE '--target=x86_64-unknown-linux-gnu' -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer ... (remaining 159 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error: invalid argument '-std=c++14' not allowed with 'C'
ERROR: /home/peddie/.cache/bazel/_bazel_peddie/d44546e2b755e65528d263d98d986bf0/external/starling/rtklib_rtcm/BUILD.bazel:3:22: Compiling rtklib_rtcm/src/rtkcmn.c failed: (Exit 1): clang failed: error executing command (from target @starling//rtklib_rtcm:rtklib_rtcm) external/rules_swiftnav/cc/toolchains/llvm/x86_64-linux/wrappers/clang -U_FORTIFY_SOURCE '--target=x86_64-unknown-linux-gnu' -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer ... (remaining 159 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error: invalid argument '-std=c++14' not allowed with 'C'
ERROR: /home/peddie/.cache/bazel/_bazel_peddie/d44546e2b755e65528d263d98d986bf0/external/starling/rtklib_rtcm/BUILD.bazel:3:22: Compiling rtklib_rtcm/src/rtklib_igs/rtklib_rinex.c failed: (Exit 1): clang failed: error executing command (from target @starling//rtklib_rtcm:rtklib_rtcm) external/rules_swiftnav/cc/toolchains/llvm/x86_64-linux/wrappers/clang -U_FORTIFY_SOURCE '--target=x86_64-unknown-linux-gnu' -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer ... (remaining 159 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error: invalid argument '-std=c++14' not allowed with 'C'

This is already supported in `swift_cc_library` and `swift_cc_tool`.
@peddie peddie force-pushed the peddie/swift-test-language-standards branch from 92fd345 to 304f801 Compare October 16, 2024 04:37
@peddie
Copy link
Contributor Author

peddie commented Oct 16, 2024

Worked around the above errors by only passing this for swift_cc_test but not for the swift_cc_test_library rule for now.

@peddie peddie merged commit 90bcf15 into main Oct 16, 2024
1 check passed
@peddie peddie deleted the peddie/swift-test-language-standards branch October 16, 2024 22:35
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