NSPR: Bad CL syntax on now.c

RESOLVED DUPLICATE of bug 980170

Status

RESOLVED DUPLICATE of bug 980170
5 years ago
2 years ago

People

(Reporter: dmajor, Assigned: wtc)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
I noticed this in a build log. The CL parameters for now.c are not getting used as expected. For example, it tries to parse -OPT:REF as six different -O switches ('P','T',':','R','E','F').

I don't know whether this actually causes any harm to the build.

    e:\builds\moz2_slave\m-in-w32-000000000000000000000\build\nsprpub\config\rules.mk:443:0$ cl -Fonow.obj -c      -Oy- -W3 -nologo -GF -Gy -MD -O2 -Zi  -DlibVersionPoint=libVersionPoint -UDEBUG -U_DEBUG -UWINNT  -DMOZILLA_CLIENT=1 -DNDEBUG=1 -DXP_PC=1 -DWIN32=1 -D_CRT_SECURE_NO_WARNINGS=1 -D_CRT_NONSTDC_NO_WARNINGS=1 -DWIN95=1 -D_PR_GLOBAL_THREADS_ONLY=1 -D_X86_=1  -DFORCE_PR_LOG   "e:/builds/moz2_slave/m-in-w32-000000000000000000000/build/nsprpub/config/now.c"
    now.c
    e:\builds\moz2_slave\m-in-w32-000000000000000000000\build\obj-firefox\nsprpub\config\Makefile:117:0$ cl  now.obj -DEBUG -OPT:REF  -Fenow.exe
    Microsoft (R) Incremental Linker Version 10.00.30319.01
    Copyright (C) Microsoft Corporation.  All rights reserved.
     
    /out:now.exe
    now.obj
    e:\builds\moz2_slave\m-in-w32-000000000000000000000\build\obj-firefox\nsprpub\config\Makefile:106:0$ rm -f e:/builds/moz2_slave/m-in-w32-000000000000000000000/build/obj-firefox/dist/bin/nspr-config
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
    Copyright (C) Microsoft Corporation.  All rights reserved.
     
    cl : Command line warning D9002 : ignoring unknown option '-OP'
    cl : Command line warning D9002 : ignoring unknown option '-OT'
    cl : Command line warning D9002 : ignoring unknown option '-O:'
    cl : Command line warning D9002 : ignoring unknown option '-OR'
    cl : Command line warning D9002 : ignoring unknown option '-OE'
    cl : Command line warning D9002 : ignoring unknown option '-OF'
(Assignee)

Comment 1

5 years ago
Thank you for the bug report. Do you know how to fix it?

I found that the /OPT:REF linker option is still supported:
http://msdn.microsoft.com/en-us/library/bxwfs976.aspx

Perhaps the problem is that we pass it to CL rather than LINK?
(Reporter)

Comment 2

5 years ago
While searching for duplicates I found bug 586113, which has this discussion:

> In VS9, -OPT:REF -OPT:ICF was accepted by cl; in VS10 apparently it isn't. We need to pass these flags to the linker instead.

> AFAICT, all that's needed is /link before the linker options.  I've looked at cl.exe parameters going back to VS2005 and it shouldn't break anything with earlier compilers.

I don't know whether these statements are correct, but it may be worth a try.
(Reporter)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 980170
You need to log in before you can comment on or make changes to this bug.