mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 04:16:46 +00:00

This avoids producing an output file if errors appeared late in the linking process (e.g. while fixing relocations, or as in the test, while checking for multiple resources). If an output file is produced, build tools might not retry building it on rebuilds, even if a previous build failed due to the error return code. Differential Revision: https://reviews.llvm.org/D66491 llvm-svn: 369445
14 lines
667 B
Plaintext
14 lines
667 B
Plaintext
# RUN: llvm-cvtres /out:%t_resource.obj %S/Inputs/resource.res
|
|
# RUN: llvm-cvtres /out:%t_id.obj %S/Inputs/id.res
|
|
# RUN: rm -f %t.exe
|
|
# RUN: not lld-link /out:%t.exe /dll /noentry %t_id.obj %t_resource.obj 2>&1 | \
|
|
# RUN: FileCheck --check-prefix=TWOOBJ %s
|
|
# RUN: not test -f %t.exe
|
|
|
|
TWOOBJ: error: {{.*}}_resource.obj: more than one resource obj file not allowed, already got {{.*}}_id.obj
|
|
|
|
# RUN: not lld-link /out:%t.exe /dll /noentry %S/Inputs/id.res %t_resource.obj 2>&1 | \
|
|
# RUN: FileCheck --check-prefix=OBJRES %s
|
|
|
|
OBJRES: error: internal .obj file created from .res files: more than one resource obj file not allowed, already got {{.*}}_resource.obj
|