mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 12:32:21 +00:00
Tests: Invoke clang frontend instead of cc1 in ClangPlugin tests
Reverts 7fcedae610
at the same time
This commit is contained in:
parent
a2167f126d
commit
27503a5320
Notes:
github-actions[bot]
2025-05-12 20:02:03 +00:00
Author: https://github.com/ADKaster
Commit: 27503a5320
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4712
Reviewed-by: https://github.com/trflynn89 ✅
21 changed files with 20 additions and 22 deletions
|
@ -11,7 +11,6 @@ list(APPEND CLANG_PLUGINS_COMPILE_OPTIONS_FOR_TESTS
|
|||
-Wno-literal-range
|
||||
-Wno-unknown-warning-option
|
||||
-Wno-unqualified-std-cast-call
|
||||
-fgnuc-version=4.2.1 # NOTE: Clang default as of 10.0.0
|
||||
)
|
||||
|
||||
# Ensure we always check for invalid function field types regardless of the value of ENABLE_CLANG_PLUGINS_INVALID_FUNCTION_MEMBERS
|
||||
|
@ -19,7 +18,6 @@ list(APPEND CLANG_PLUGINS_COMPILE_OPTIONS_FOR_TESTS
|
|||
# list(APPEND CLANG_PLUGINS_COMPILE_OPTIONS_FOR_TESTS -fplugin-arg-libjs_gc_scanner-detect-invalid-function-members)
|
||||
|
||||
get_property(CLANG_PLUGINS_INCLUDE_DIRECTORIES TARGET AK PROPERTY INCLUDE_DIRECTORIES)
|
||||
list(APPEND CLANG_PLUGINS_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
|
||||
|
||||
configure_lit_site_cfg(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <AK/Function.h>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
// expected-no-diagnostics
|
||||
|
||||
#include <AK/Function.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibGC/ForeignCell.h>
|
||||
#include <LibJS/Runtime/PrototypeObject.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
// expected-no-diagnostics
|
||||
|
||||
#include <LibGC/ForeignCell.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibGC/ForeignCell.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibGC/ForeignCell.h>
|
||||
#include <LibJS/Runtime/PrototypeObject.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
// expected-no-diagnostics
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
// expected-no-diagnostics
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
// expected-no-diagnostics
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
// expected-no-diagnostics
|
||||
|
||||
#include <LibGC/Cell.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
// FIXME: Un-XFAIL this when re-enabling the plugin option in the Tests CMakeLists.txt
|
||||
// XFAIL: true
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
// RUN: %clang++ -cc1 -verify %plugin_opts% %s 2>&1
|
||||
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
||||
|
||||
#include <LibGC/Ptr.h>
|
||||
#include <LibGC/RootVector.h>
|
||||
|
|
|
@ -18,7 +18,7 @@ config.substitutions.append(("%target_triple", config.target_triple))
|
|||
config.substitutions.append(("%PATH%", config.environment["PATH"]))
|
||||
|
||||
plugin_includes = " ".join(f"-I{s}" for s in config.plugin_includes.split(";"))
|
||||
plugin_opts = " ".join(s.replace("-fplugin=", "-load ") for s in config.plugin_opts.split(";"))
|
||||
plugin_opts = " ".join(s for s in config.plugin_opts.split(";"))
|
||||
config.substitutions.append(("%plugin_opts%", f"{plugin_opts} {plugin_includes}"))
|
||||
|
||||
tools = ["clang", "clang++"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue