summaryrefslogtreecommitdiff
path: root/command_line/C++_Parser/Src/Library/ToolHelpers-cc.c
blob: 6c19b5b8f4fbe5c8888f7be1df3e1400cd23a34e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "parser.h"
#include "cmdline.h"

int Opt_DummyLinkerRoutine(const char *opt, void *, const char *, int) {
    CLPFatalError("Calling linker option '%s'\n", opt);
    return 0;
}

int Opt_DummyLinkerSettingRoutine(const char *var, const char *val) {
    CLPFatalError("Calling linker settings option '%s'='%s'\n", var, val ? val : "");
    return 0;
}

void FinishCompilerTool(void) {
    SInt32 numfiles;

    if (parseopts.lastoutputname[0]) {
        numfiles = GetFileCount();

        if (pCmdLine.stages == CmdLineStageMask_Dp) {
            strcpy(pCmdLineCompiler.outMakefile, parseopts.lastoutputname);
        } else if (outputOrdering == OutputOrdering2) {
            if (parseopts.possibleFiles > 0 || parseopts.userSpecifiedFiles > 0)
                CLPReportError(CLPStr41, parseopts.lastoutputname);
            else
                CLPReportError(CLPStr42, parseopts.lastoutputname);
        } else {
            SetFileOutputName(numfiles - 1, lastStage, parseopts.lastoutputname);
        }

        parseopts.lastoutputname[0] = 0;
    }

    if (setOutputDirectory)
        pCmdLineCompiler.relPathInOutputDir = 0;
}