Kaydet (Commit) 7c5a21dd authored tarafından Stephan Bergmann's avatar Stephan Bergmann

rsc: ignore -isystem args

Change-Id: Ic46b84d740159826542ead857d15230d54547d88
üst aa6495b6
......@@ -235,7 +235,20 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
bool bSetSrs = false;
while( ppStr && i < (aCmdLine.GetCount() -1) )
{
if( '-' == **ppStr )
if (strcmp(*ppStr, "-isystem") == 0)
{
// ignore "-isystem" and following arg
if (i < aCmdLine.GetCount() - 1)
{
++ppStr;
++i;
}
}
else if (strncmp(*ppStr, "-isystem", strlen("-isystem")) == 0)
{
// ignore args starting with "-isystem"
}
else if( '-' == **ppStr )
{
if( !rsc_stricmp( (*ppStr) + 1, "p" )
|| !rsc_stricmp( (*ppStr) + 1, "l" ) )
......
......@@ -100,7 +100,20 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "CmdLineArg: \"%s\"\n", *ppStr );
#endif
if( '-' == **ppStr )
if (strcmp(*ppStr, "-isystem") == 0)
{
// ignore "-isystem" and following arg
if (i < aCmdLine.GetCount() - 1)
{
++ppStr;
++i;
}
}
else if (strncmp(*ppStr, "-isystem", strlen("-isystem")) == 0)
{
// ignore args starting with "-isystem"
}
else if( '-' == **ppStr )
{
if( !rsc_stricmp( (*ppStr) + 1, "h" )
|| !strcmp( (*ppStr) + 1, "?" ) )
......
......@@ -217,7 +217,19 @@ dooptions(int argc, char** argv)
for (i = j = 1; i < argc; i++) {
arg = ap = argv[i];
if (*ap++ != '-' || *ap == EOS)
if (strcmp(arg, "-isystem") == 0)
{
// ignore "-isystem" and following arg
if (i < argc)
{
++i;
}
}
else if (strncmp(arg, "-isystem", strlen("-isystem")) == 0)
{
// ignore args starting with "-isystem"
}
else if (*ap++ != '-' || *ap == EOS)
{
argv[j++] = argv[i];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment