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

feat: 컴파일 옵션 설정 기능 #46

Merged
merged 2 commits into from
Aug 9, 2024
Merged

Conversation

minkyu97
Copy link
Collaborator

@minkyu97 minkyu97 commented Aug 9, 2024

추가된 기능

컴파일러 옵션을 설정할 수 있는 기능을 추가하고, BOJ 언어 정보를 참고하여 c++, c, java 의 기본 컴파일러 옵션을 아래와 같이 지정한다.

  • c++ : -O2 -static -std=gnu17
  • c : -O2 -static -std=gnu11
  • java : --release 17 -encoding UTF-8 -J-Xms1024m -JXmx1920m -J-Xss512m
    기본 컴파일러 옵션(최적화 등)은 덮어씌울 수 있으며, 기본 컴파일러 인자(출력 바이너리 등)은 덮어씌울 수 없다.

테스트 방법

compile_options 인자를 바꾸어가며 결과가 달라지는지 테스트한다.
c++ 의 O2 옵션을 주거나 주지 않았을 때 큰 차이가 나는 것을 알 수 있다.

관련 링크

https://help.acmicpc.net/language/info
https://wafflestudio.slack.com/archives/C07DDPK0TD4/p1723218224088249

@minkyu97 minkyu97 requested a review from woohm402 August 9, 2024 17:20
@minkyu97 minkyu97 self-assigned this Aug 9, 2024
@minkyu97
Copy link
Collaborator Author

minkyu97 commented Aug 9, 2024

선 머지 후 리뷰 받겠습니다.

@minkyu97 minkyu97 merged commit e69313e into main Aug 9, 2024
1 check passed
@minkyu97 minkyu97 deleted the feat/compiler-options branch August 9, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant