|
@@ -256,6 +256,7 @@ public:
|
|
|
optSaveQueryText = false;
|
|
|
optGenerateHeader = false;
|
|
|
optShowPaths = false;
|
|
|
+ optNoSourcePath = false;
|
|
|
optTargetClusterType = HThorCluster;
|
|
|
optTargetCompiler = DEFAULT_COMPILER;
|
|
|
optThreads = 0;
|
|
@@ -372,6 +373,7 @@ protected:
|
|
|
bool optLegacyWhen;
|
|
|
bool optGenerateHeader;
|
|
|
bool optShowPaths;
|
|
|
+ bool optNoSourcePath;
|
|
|
int argc;
|
|
|
const char **argv;
|
|
|
};
|
|
@@ -1289,7 +1291,7 @@ void EclCC::processFile(EclCompileInstance & instance)
|
|
|
const char * curFilename = instance.inputFile->queryFilename();
|
|
|
assertex(curFilename);
|
|
|
|
|
|
- Owned<ISourcePath> sourcePath = createSourcePath(curFilename);
|
|
|
+ Owned<ISourcePath> sourcePath = optNoSourcePath ? NULL : createSourcePath(curFilename);
|
|
|
Owned<IFileContents> queryText = createFileContentsFromFile(curFilename, sourcePath);
|
|
|
const char * queryTxt = queryText->getText();
|
|
|
if (optArchive || optGenerateDepend)
|
|
@@ -1327,12 +1329,12 @@ void EclCC::processFile(EclCompileInstance & instance)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- withinRepository = !inputFromStdIn && checkWithinRepository(attributePath, curFilename);
|
|
|
+ withinRepository = !inputFromStdIn && !optNoSourcePath && checkWithinRepository(attributePath, curFilename);
|
|
|
}
|
|
|
|
|
|
|
|
|
StringBuffer expandedSourceName;
|
|
|
- if (!inputFromStdIn)
|
|
|
+ if (!inputFromStdIn && !optNoSourcePath)
|
|
|
makeAbsolutePath(curFilename, expandedSourceName);
|
|
|
else
|
|
|
expandedSourceName.append(curFilename);
|
|
@@ -1358,7 +1360,7 @@ void EclCC::processFile(EclCompileInstance & instance)
|
|
|
{
|
|
|
//Ensure that $ is valid for any file submitted - even if it isn't in the include direcotories
|
|
|
//Disable this for the moment when running the regression suite.
|
|
|
- if (!optBatchMode && !withinRepository && !inputFromStdIn && !optLegacyImport)
|
|
|
+ if (!optBatchMode && !withinRepository && !inputFromStdIn && !optNoSourcePath && !optLegacyImport)
|
|
|
{
|
|
|
//Associate the contents of the directory with an internal module called _local_directory_
|
|
|
//(If it was root it might override existing root symbols). $ is the only public way to get at the symbol
|
|
@@ -1854,6 +1856,9 @@ bool EclCC::parseCommandLineOptions(int argc, const char* argv[])
|
|
|
else if (iter.matchFlag(optEvaluateResult, "-Me"))
|
|
|
{
|
|
|
}
|
|
|
+ else if (iter.matchFlag(optNoSourcePath, "--nosourcepath"))
|
|
|
+ {
|
|
|
+ }
|
|
|
else if (iter.matchFlag(optOutputFilename, "-o"))
|
|
|
{
|
|
|
}
|
|
@@ -2054,6 +2059,7 @@ const char * const helpText[] = {
|
|
|
#ifdef _WIN32
|
|
|
"! -m Enable leak checking",
|
|
|
#endif
|
|
|
+ " --nosourcepath Compile as if the source came from stdin",
|
|
|
#ifndef _WIN32
|
|
|
"! -pch Generate precompiled header for eclinclude4.hpp",
|
|
|
#endif
|