Skip to content

Synchronise goto-cc command-line options to re-enable Windows regression tests #5572

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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions regression/goto-cc-cbmc-shared-options/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
if(WIN32)
set(is_windows true)
set(exclude_broken_windows_tests -X winbug)
else()
set(is_windows false)
set(exclude_broken_windows_tests "")
endif()

add_test_pl_tests(
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:cbmc> ${is_windows}" ${exclude_broken_windows_tests}
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:cbmc> ${is_windows}"
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CORE winbug
CORE
test.c
--function main --object-bits 6
^EXIT=10$
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CORE winbug
CORE
test.c
--function main --object-bits 10
^EXIT=10$
Expand Down
9 changes: 7 additions & 2 deletions src/goto-cc/armcc_cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Author: Daniel Kroening
/// \return none
// see
// http://infocenter.arm.com/help/topic/com.arm.doc.dui0472c/Cchbggjb.html

// clang-format off
static const char *options_no_arg[]=
{
// goto-cc-specific
Expand All @@ -44,6 +44,9 @@ static const char *options_no_arg[]=
"--no-arch",
"--no-library",
"--string-abstraction",
"--validate-goto-model",
"-?",
"--export-file-local-symbols",

// armcc
"--help",
Expand Down Expand Up @@ -201,7 +204,6 @@ static const char *options_no_arg[]=
nullptr
};

// clang-format off
static const std::vector<std::string> options_with_prefix
{
"--project=",
Expand Down Expand Up @@ -256,6 +258,9 @@ static const std::vector<std::string> options_with_arg
// goto-cc specific
"--verbosity",
"--function",
"--print-rejected-preprocessed-source",
"--mangle-suffix",
"--object-bits",

// armcc-specific
"-D",
Expand Down
4 changes: 4 additions & 0 deletions src/goto-cc/bcc_cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Author: Michael Tautschnig

#include <util/prefix.h>

// clang-format off
// non-bcc options
const char *goto_bcc_options_with_argument[]=
{
Expand All @@ -24,6 +25,8 @@ const char *goto_bcc_options_with_argument[]=
"--native-compiler",
"--native-linker",
"--print-rejected-preprocessed-source",
"--mangle-suffix",
"--object-bits",
nullptr
};

Expand Down Expand Up @@ -66,6 +69,7 @@ const char *bcc_options_with_argument[]=
"-t",
nullptr
};
// clang-format on

bool bcc_cmdlinet::parse(int argc, const char **argv)
{
Expand Down
3 changes: 2 additions & 1 deletion src/goto-cc/ms_cl_cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const char *non_ms_cl_options[]=
"--validate-goto-model",
"--export-file-local-symbols",
"--mangle-suffix",
"--object-bits",
nullptr
};
// clang-format on
Expand All @@ -63,7 +64,7 @@ bool ms_cl_cmdlinet::parse(const std::vector<std::string> &arguments)

if(
arguments[i] == "--verbosity" || arguments[i] == "--function" ||
arguments[i] == "--mangle-suffix")
arguments[i] == "--mangle-suffix" || arguments[i] == "--object-bits")
{
if(i < arguments.size() - 1)
{
Expand Down
5 changes: 4 additions & 1 deletion src/goto-cc/ms_link_cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ Author: Daniel Kroening

#include <util/unicode.h>

// clang-format off
/// parses the command line options into a cmdlinet
/// \par parameters: argument count, argument strings
/// \return none
const char *non_ms_link_options[]=
{
"--help",
"--verbosity"
"--verbosity",
"--validate-goto-model"
};
// clang-format on

bool ms_link_cmdlinet::parse(const std::vector<std::string> &arguments)
{
Expand Down