Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Add Clang 18/19 Support #47438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

amosbird
Copy link
Contributor

This PR adds support to compile Doris backend with Clang 19.

I've tested this PR with both Clang 16 and Clang 19 using:

env DISABLE_BUILD_AZURE=1 ./build.sh --be --clean  

(Azure was disabled due to challenges patching deps in azure-sdk-for-cpp-azure-core_1.10.3 via vcpkg.)

I've released a new toolchain with GCC 14 and Clang 19 here: ldb_toolchain.

Happy New Year to the Doris community! 🎉

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Copy link
Contributor

@zhiqiang-hhhh zhiqiang-hhhh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BMJL,orz
Happy new year!

@zhiqiang-hhhh
Copy link
Contributor

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 32435 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 3d2ba31578a09ba49dc8d6b7ece90ccbfa8224d0, data reload: false

------ Round 1 ----------------------------------
q1	17584	5590	5353	5353
q2	2060	311	166	166
q3	10498	1257	760	760
q4	10221	978	540	540
q5	7769	2394	2240	2240
q6	193	168	140	140
q7	925	765	596	596
q8	9223	1374	1177	1177
q9	5227	4839	4872	4839
q10	6855	2339	1891	1891
q11	501	270	252	252
q12	338	354	219	219
q13	17766	3746	3150	3150
q14	236	233	218	218
q15	536	472	479	472
q16	630	621	576	576
q17	572	861	331	331
q18	7262	6587	6498	6498
q19	2183	950	533	533
q20	311	324	194	194
q21	2860	2228	1971	1971
q22	362	335	319	319
Total cold run time: 104112 ms
Total hot run time: 32435 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5552	5458	5522	5458
q2	246	325	236	236
q3	2301	2695	2315	2315
q4	1432	1820	1383	1383
q5	4336	4755	4736	4736
q6	170	166	128	128
q7	2083	1953	1850	1850
q8	2628	2896	2793	2793
q9	7218	7162	7309	7162
q10	3012	3267	2793	2793
q11	558	497	480	480
q12	655	717	566	566
q13	3536	3919	3306	3306
q14	278	329	265	265
q15	532	486	475	475
q16	638	697	640	640
q17	1227	1729	1277	1277
q18	7749	7420	7297	7297
q19	850	1203	1067	1067
q20	2013	2046	1897	1897
q21	5726	5307	4846	4846
q22	619	619	619	619
Total cold run time: 53359 ms
Total hot run time: 51589 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192999 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 3d2ba31578a09ba49dc8d6b7ece90ccbfa8224d0, data reload: false

query1	1326	966	955	955
query2	6094	2162	2103	2103
query3	10982	4380	4411	4380
query4	60828	29499	23037	23037
query5	5402	593	450	450
query6	437	225	176	176
query7	5555	528	305	305
query8	318	251	226	226
query9	8227	2608	2584	2584
query10	435	307	247	247
query11	17491	15174	15806	15174
query12	165	113	105	105
query13	1436	532	436	436
query14	10708	7663	7682	7663
query15	211	210	203	203
query16	6898	655	485	485
query17	1111	759	614	614
query18	1408	415	329	329
query19	199	183	169	169
query20	128	118	117	117
query21	209	129	111	111
query22	4354	4460	4532	4460
query23	34220	33218	33526	33218
query24	5576	2327	2368	2327
query25	479	468	411	411
query26	652	272	157	157
query27	1563	487	330	330
query28	4379	2502	2473	2473
query29	529	579	413	413
query30	212	186	157	157
query31	936	907	834	834
query32	69	59	58	58
query33	461	351	311	311
query34	758	876	507	507
query35	853	838	775	775
query36	1008	1037	963	963
query37	118	102	80	80
query38	4359	4351	4331	4331
query39	1518	1469	1449	1449
query40	232	137	118	118
query41	53	49	47	47
query42	121	113	103	103
query43	542	533	522	522
query44	1333	839	822	822
query45	186	172	167	167
query46	893	1058	666	666
query47	1883	1929	1839	1839
query48	379	422	329	329
query49	691	492	403	403
query50	659	666	392	392
query51	4317	4288	4287	4287
query52	109	109	97	97
query53	256	272	182	182
query54	497	488	427	427
query55	81	79	82	79
query56	272	269	262	262
query57	1180	1204	1157	1157
query58	240	241	267	241
query59	3214	3410	3310	3310
query60	281	263	261	261
query61	117	117	110	110
query62	741	722	666	666
query63	221	191	191	191
query64	1269	1012	688	688
query65	3289	3179	3174	3174
query66	711	392	295	295
query67	15926	15594	15509	15509
query68	5015	838	539	539
query69	501	306	268	268
query70	1223	1161	1156	1156
query71	420	289	256	256
query72	6125	3902	3831	3831
query73	796	763	360	360
query74	9216	9097	9052	9052
query75	3207	3154	2679	2679
query76	3818	1156	768	768
query77	504	376	271	271
query78	10278	10165	9359	9359
query79	2500	791	602	602
query80	1438	531	449	449
query81	536	277	235	235
query82	352	157	124	124
query83	259	167	153	153
query84	291	93	74	74
query85	764	403	308	308
query86	413	323	297	297
query87	4549	4449	4392	4392
query88	3726	2207	2172	2172
query89	393	331	294	294
query90	1597	194	192	192
query91	134	139	108	108
query92	60	59	54	54
query93	1886	901	532	532
query94	727	405	315	315
query95	343	276	261	261
query96	487	614	279	279
query97	2802	2865	2711	2711
query98	213	207	190	190
query99	1283	1386	1251	1251
Total cold run time: 307161 ms
Total hot run time: 192999 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.21 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 3d2ba31578a09ba49dc8d6b7ece90ccbfa8224d0, data reload: false

query1	0.03	0.03	0.04
query2	0.07	0.04	0.03
query3	0.24	0.07	0.06
query4	1.62	0.11	0.10
query5	0.40	0.41	0.40
query6	1.17	0.66	0.66
query7	0.02	0.02	0.02
query8	0.04	0.02	0.03
query9	0.58	0.50	0.53
query10	0.57	0.56	0.56
query11	0.15	0.09	0.10
query12	0.14	0.11	0.10
query13	0.62	0.62	0.59
query14	2.86	2.71	2.89
query15	0.90	0.83	0.83
query16	0.39	0.38	0.38
query17	0.98	0.97	1.10
query18	0.23	0.22	0.21
query19	1.93	1.81	1.92
query20	0.01	0.01	0.01
query21	15.38	0.91	0.57
query22	0.75	0.75	0.59
query23	15.37	1.45	0.55
query24	2.93	0.77	1.24
query25	0.25	0.08	0.18
query26	0.24	0.14	0.13
query27	0.06	0.05	0.05
query28	14.06	1.09	0.44
query29	12.62	4.00	3.27
query30	0.25	0.10	0.08
query31	2.82	0.59	0.39
query32	3.24	0.56	0.46
query33	3.02	3.04	3.10
query34	16.65	5.08	4.46
query35	4.52	4.47	4.48
query36	0.64	0.49	0.48
query37	0.10	0.06	0.06
query38	0.04	0.04	0.03
query39	0.04	0.03	0.02
query40	0.16	0.14	0.12
query41	0.08	0.02	0.03
query42	0.04	0.02	0.03
query43	0.04	0.03	0.03
Total cold run time: 106.25 s
Total hot run time: 30.21 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.06% (10969/26082)
Line Coverage: 32.33% (92723/286775)
Region Coverage: 31.48% (47536/151017)
Branch Coverage: 27.52% (24075/87486)
Coverage Report: http://coverage.selectdb-in.cc/coverage/3d2ba31578a09ba49dc8d6b7ece90ccbfa8224d0_3d2ba31578a09ba49dc8d6b7ece90ccbfa8224d0/report/index.html

@zhiqiang-hhhh
Copy link
Contributor

run p0

@amosbird
Copy link
Contributor Author

amosbird commented Jan 25, 2025

error: assigning field to itself [-Werror,-Wself-assign-field]
  268 |             this->pos = pos;
      |                       ^

https://github.com/apache/doris-thirdparty/blob/9a7d670e034762cb653688c11789a8e8346ca7fe/src/core/CLucene/util/CLStreams.h#L266-L270

This doesn't seem correct. @xiaokang any insights?

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jan 26, 2025
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@zhiqiang-hhhh zhiqiang-hhhh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@zclllyybb zclllyybb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unstable pipeline skipped. we can merge it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants